IMPLEMENT_CLASS(wxPrinterBase, wxObject)
IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject)
IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow)
IMPLEMENT_CLASS(wxPrinterBase, wxObject)
IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject)
IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow)
-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);
}
{
wxMessageBox(message, _("Printing Error"), wxOK, parent);
}
wxScrolledWindow(parent, -1, pos, size, style, name)
{
m_printPreview = preview;
wxScrolledWindow(parent, -1, pos, size, style, name)
{
m_printPreview = preview;
SetScrollbars(15, 18, 100, 100);
}
SetScrollbars(15, 18, 100, 100);
}
// Responds to colour changes, and passes event on to children.
void wxPreviewCanvas::OnSysColourChanged(wxSysColourChangedEvent& event)
{
// Responds to colour changes, and passes event on to children.
void wxPreviewCanvas::OnSysColourChanged(wxSysColourChangedEvent& event)
{
- 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!"));
+
m_previewBitmap = new wxBitmap((int)actualWidth, (int)actualHeight);
if (!m_previewBitmap || !m_previewBitmap->Ok())
{
m_previewBitmap = new wxBitmap((int)actualWidth, (int)actualHeight);
if (!m_previewBitmap || !m_previewBitmap->Ok())
{
wxMessageBox(_("Sorry, not enough memory to create a preview."), _("Print Preview Failure"), wxOK);
return FALSE;
}
wxMessageBox(_("Sorry, not enough memory to create a preview."), _("Print Preview Failure"), wxOK);
return FALSE;
}