]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/prntbase.cpp
applied patch 430835 (missing wxSTD breaking compilation for VC++ 5)
[wxWidgets.git] / src / common / prntbase.cpp
index 059fa64f8cb1685e33c81d7a5d6ee108c58fbe20..bbbcefc57dc87ceced9fcc4bdfaaa47b5a3cb417 100644 (file)
@@ -82,10 +82,12 @@ wxPrinterBase::wxPrinterBase(wxPrintDialogData *data)
     sm_abortIt = FALSE;
     if (data)
         m_printDialogData = (*data);
+    sm_lastError = wxPRINTER_NO_ERROR;
 }
 
 wxWindow *wxPrinterBase::sm_abortWindow = (wxWindow *) NULL;
 bool wxPrinterBase::sm_abortIt = FALSE;
+wxPrinterError wxPrinterBase::sm_lastError = wxPRINTER_NO_ERROR;
 
 wxPrinterBase::~wxPrinterBase()
 {
@@ -113,7 +115,7 @@ wxWindow *wxPrinterBase::CreateAbortWindow(wxWindow *parent, wxPrintout *WXUNUSE
     return dialog;
 }
 
-void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout), char *message)
+void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout), const wxString& message)
 {
     wxMessageBox(message, _("Printing Error"), wxOK, parent);
 }
@@ -653,12 +655,14 @@ bool wxPrintPreviewBase::PaintPage(wxWindow *canvas, wxDC& dc)
 
 bool wxPrintPreviewBase::RenderPage(int pageNum)
 {
+    wxBusyCursor busy;
+
     int canvasWidth, canvasHeight;
 
     if (!m_previewCanvas)
     {
-        wxMessageBox(_("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!"),
-            _("Print Preview Failure"), wxOK);
+        wxFAIL_MSG(_T("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!"));
+
         return FALSE;
     }
     m_previewCanvas->GetSize(&canvasWidth, &canvasHeight);