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)
{
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)
void wxPreviewFrame::Initialize()
{
+#if wxUSE_STATUSBAR
CreateStatusBar();
+#endif
CreateCanvas();
CreateControlBar();
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;
}