- printout->OnPreparePrinting();
-
- // Get some parameters from the printout, if defined
- int fromPage, toPage;
- int minPage, maxPage;
- printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage);
-
- if (maxPage == 0)
- {
- sm_lastError = wxPRINTER_ERROR;
- return false;
- }
-
- // Only set min and max, because from and to will be
- // set by the user
- m_printDialogData.SetMinPage(minPage);
- m_printDialogData.SetMaxPage(maxPage);
-