X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca5020c22926a6906e510671b53fad226d6de968..ace0fab4f1207124c8d3e4fcf552e596ff9dc470:/src/common/prntbase.cpp?ds=sidebyside diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 0b3899fdc4..4f5860323f 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -503,7 +503,7 @@ BEGIN_EVENT_TABLE(wxPreviewFrame, wxFrame) EVT_CLOSE(wxPreviewFrame::OnCloseWindow) END_EVENT_TABLE() -wxPreviewFrame::wxPreviewFrame(wxPrintPreviewBase *preview, wxFrame *parent, const wxString& title, +wxPreviewFrame::wxPreviewFrame(wxPrintPreviewBase *preview, wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name): wxFrame(parent, -1, title, pos, size, style, name) { @@ -511,7 +511,7 @@ wxFrame(parent, -1, title, pos, size, style, name) m_controlBar = NULL; m_previewCanvas = NULL; - // Looks silly on Windows with a standard Windows icon + // Give the application icon #ifdef __WXMSW__ wxFrame* topFrame = wxDynamicCast(wxTheApp->GetTopWindow(), wxFrame); if (topFrame) @@ -547,7 +547,9 @@ void wxPreviewFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) void wxPreviewFrame::Initialize() { +#if wxUSE_STATUSBAR CreateStatusBar(); +#endif CreateCanvas(); CreateControlBar(); @@ -780,14 +782,16 @@ bool wxPrintPreviewBase::RenderPage(int pageNum) memoryDC.SelectObject(wxNullBitmap); - wxChar buf[200]; +#if wxUSE_STATUSBAR + wxString status; if (m_maxPage != 0) - wxSprintf(buf, _("Page %d of %d"), pageNum, m_maxPage); + status = wxString::Format(_("Page %d of %d"), pageNum, m_maxPage); else - wxSprintf(buf, _("Page %d"), pageNum); + status = wxString::Format(_("Page %d"), pageNum); if (m_previewFrame) - m_previewFrame->SetStatusText(buf); + m_previewFrame->SetStatusText(status); +#endif return TRUE; }