int wxPreviewControlBar::GetZoomControl()
{
wxChar buf[20];
- if (m_zoomControl && (m_zoomControl->GetStringSelection() != _T("")))
+ if (m_zoomControl && (m_zoomControl->GetStringSelection() != wxT("")))
{
wxStrcpy(buf, m_zoomControl->GetStringSelection());
buf[wxStrlen(buf) - 1] = 0;
m_leftMargin = 40;
m_pageWidth = 0;
m_pageHeight = 0;
+ m_printingPrepared = FALSE;
- printout->OnPreparePrinting();
+ // Too soon! Moved to RenderPage.
+ // printout->OnPreparePrinting();
// Get some parameters from the printout, if defined
int selFrom, selTo;
m_previewPrintout->SetDC(&memoryDC);
m_previewPrintout->SetPageSizePixels(m_pageWidth, m_pageHeight);
+ // Need to delay OnPreparePrinting until here, so we have enough information.
+ if (!m_printingPrepared)
+ {
+ m_previewPrintout->OnPreparePrinting();
+ m_printingPrepared = TRUE;
+ }
+
m_previewPrintout->OnBeginPrinting();
if (!m_previewPrintout->OnBeginDocument(m_printDialogData.GetFromPage(), m_printDialogData.GetToPage()))