Hi, I'm doing some printing issues with MFC in VS.NET 2003.
I want to change the format of printing to landscape. For that case I added these lines of code my OnBeginPrinting function:
When I execute my programm and choose the printing option the first preview is still in potrait event though the lines of codes written above where executed. The second time the preview is shown correctly in landscape.Code:// print this report in landscape LPDEVMODE lpPr = (LPDEVMODE)(((CPrintDialog *)(pInfo->m_pPD))->GetDevMode()); lpPr->dmOrientation = DMORIENT_LANDSCAPE; pwMain->OnBeginPrinting( this,pDC,pInfo,&m_pageGrid.m_wDataGrid,m_prtcols,&m_prtmap );
What do I make wrong?
Akademos




Reply With Quote