diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index 19e0feebc..946eb1f6a 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -4515,12 +4515,12 @@ WINDOW statbar_create(int cid, int left, int top, int right, int bottom, if (w != NULL) { const int nStyle = 0; // not wxST_SIZEGRIP - pStatusBar = w->CreateStatusBar(2, nStyle); + pStatusBar = w->CreateStatusBar(3, nStyle); if (pStatusBar != NULL) { const wxSize sz = pStatusBar->GetSize(); - const int widths[2] = { -1, 320 }; - pStatusBar->SetStatusWidths(2, widths); + const int widths[4] = { -1, sz.x/4, sz.x/4, 0 }; + pStatusBar->SetStatusWidths(3, widths); } } return (WINDOW)pStatusBar; diff --git a/xvaga/xvtextra.cpp b/xvaga/xvtextra.cpp index 3598fd1bb..f8da5d1cc 100755 --- a/xvaga/xvtextra.cpp +++ b/xvaga/xvtextra.cpp @@ -150,7 +150,6 @@ void TwxPrintOut::ResetDC() static void RCD2data(const TPRINT_RCD* prcd, wxPrintData& data) - { #ifdef WIN32 wxWindowsPrintNativeData ndb; @@ -301,7 +300,6 @@ unsigned long TwxPrintOutCache::Signature(const TPRINT_RCD* prcd) const const unsigned long i = h & 0xC0000000; if (i) h = (h ^ (i >> 12)) & 0x3FFFFFFF; } - } return h; } @@ -393,16 +391,22 @@ BOOLEAN xvt_app_escape(int esc_code, PRINT_RCD* rcd, long* ph, long* pw, long* p switch (esc_code) { case XVT_ESC_GET_PRINTER_INFO: - *ph = *pw = *pvr = *phr = 0; - if (rcd == NULL || xvt_print_is_valid(rcd)) + if (ph) *ph = *pw = 0; + if (pvr) *pvr = *phr = 0; + if (rcd == NULL || xvt_print_is_valid(rcd)) { const TwxPrintOut& po = m_PrintoutCache.Get((TPRINT_RCD*)rcd); - int w, h; - po.GetPPIPrinter(&w, &h); - *phr = w; *pvr = h; - po.GetPageSizePixels(&w, &h); - *pw = w; *ph = h; - + int w, h; + if (ph) + { + po.GetPageSizePixels(&w, &h); + *pw = w; *ph = h; + } + if (pvr) + { + po.GetPPIPrinter(&w, &h); + *phr = w; *pvr = h; + } return TRUE; } break;