I have an application that manipulates data in a variety of ways (table, graph, contact sheets, ect...).
When the user clicks 'print', the application goes through a set of property pages I made that form a 'report wizard' that, through the users manipulation, will tell the app what to print. After the report wizard is completed, a custom print dialog is displayed that has a summary sheet based on data from the wizard.
The app will open and go through the report wizard, then display the custom print dialog. But clicking print on the custom print dialog simply closes the dialog and nothing prints. It does not seem to make it to the OnPrint() override, so I suspect that the custom print dialog simply closes and that is as far as it gets.
// here is the function that is called when the user clicks print.
// this function opens the report wizard, then calls the OnPreparePrinting() function.
CARmemDoc* pDoc = GetDocument();
dlg.m_pTable = pDoc->m_pDataSheet;
if(dlg.DoModal() == ID_WIZFINISH)
info.m_pPD = new CDlgPrint3(FALSE);
info.m_pPD->m_pd.nMinPage = 1;
info.m_pPD->m_pd.nMaxPage = 0xffff;
info.m_pPD->m_pd.hInstance = AfxGetInstanceHandle();
info.m_pPD->m_pd.lpPrintTemplateName = MAKEINTRESOURCE(1538);
info.m_pPD->m_pd.Flags |= PD_ENABLEPRINTTEMPLATE;
Maybe there is something I am not initializing properly in the CPrintInfo structure properly?
Thanks for your help =]