Misc. 16-bit compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -563,8 +563,10 @@ void wxPrintPreviewBase::Init(wxPrintout *printout,
|
||||
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;
|
||||
@@ -678,6 +680,13 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
|
||||
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()))
|
||||
|
Reference in New Issue
Block a user