CMainFrame::OnSetPreviewMode not being called |
Post Reply |
Author | |
whudson
Newbie Joined: 05 May 2008 Location: United Kingdom Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 18 October 2011 at 6:52am |
In a couple of the ToolkitPro (V15.1.3) examples I've looked at that implement Print Preview, the hiding of toolbars/ribbons is not being done. It appears that CMainFrame::OnSetPreviewMode is not being called.
The view in the Codejock samples (RibbonMDISample and PrintPreview) is handling the print preview command and calling CView::DoPrintPreview, but the expected callback to CMainFrame::OnSetPreviewMode just doesn't happen. The MFC implementation of DoPrintPreview downcasts the main window to a CFrameWnd and then calls OnSetPreviewMode, but this ends up in the CFrameWnd::OnSetPreviewMode implementation even though OnSetPreviewMode is overridden in the CMainFrame class (which uses CXTPMDIFrameWnd as its base class). I am trying to implement this correctly in my own app. All that comes to mind is to hide the ribbons in the view before calling DoPrintPreview. Any other suggestions how to make it work correctly? |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |