// Writes a header on a page. Margin units are in millimetres.
bool WritePageHeader(wxPrintout *printout, wxDC *dc, wxChar *text, float mmToLogical);
-MyApp::MyApp()
-{
-}
-
// The `main program' equivalent, creating the windows and returning the
// main frame
bool MyApp::OnInit(void)
// Create the main frame window
frame = new MyFrame((wxFrame *) NULL, _T("wxWidgets Printing Demo"), wxPoint(0, 0), wxSize(400, 400));
+#if wxUSE_STATUSBAR
// Give it a status line
frame->CreateStatusBar(2);
+#endif // wxUSE_STATUSBAR
// Load icon and bitmap
frame->SetIcon( wxICON( mondrian) );
frame->Centre(wxBOTH);
frame->Show();
+#if wxUSE_STATUSBAR
frame->SetStatusText(_T("Printing demo"));
+#endif // wxUSE_STATUSBAR
SetTopWindow(frame);
SetBackgroundColour(* wxWHITE);
}
-MyCanvas::~MyCanvas(void)
-{
-}
-
// Define the repainting behaviour
void MyCanvas::OnDraw(wxDC& dc)
{
int pageWidthMM, pageHeightMM;
printout->GetPageSizeMM(&pageWidthMM, &pageHeightMM);
+ wxUnusedVar(pageHeightMM);
int leftMargin = 10;
int topMargin = 10;