Print Page | Close Window

About OnSetPreviewMode

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=13725
Printed Date: 09 May 2024 at 6:53am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: About OnSetPreviewMode
Posted By: zaozao
Subject: About OnSetPreviewMode
Date Posted: 18 March 2009 at 11:28am
Hi.
 
I have a trouble in a print preview.
 
I built the sample project(Skin MDI Sample and Print Preview Sample) with Visual Studio.net2003.
When print preview mode has been enabled, commandbars was not hide.
 
In the project, CMainFrame::OnSetPreviewMode() wasn't called.
 
By the way, When I built the project with Visual Studi 6.0, CMainFrame::OnSetPreviewMode() was called.
And commandbars was hide.
 
Please teach me how to hide commandbars with Visual Studio.net2003.



Replies:
Posted By: Oleg
Date Posted: 19 March 2009 at 1:51am
Hi,
 
Its thing of Visual Studio .NET - create standard MFC project and you will see same.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: zaozao
Date Posted: 19 March 2009 at 3:37am
Thank you oleg.
 
But I cannot solve this problem yet.
Because I used your sample projects, I don't know how can I create standard MFC project.
 
Have you ever build the sample project(ex. PrintPreview sample) with Visual Studio.net 2003 and confirmed the preview screen?
 
Please tell me about concrete creating method.
 


Posted By: ABuenger
Date Posted: 19 March 2009 at 11:14pm
Originally posted by zaozao zaozao wrote:

Please teach me how to hide commandbars with Visual Studio.net2003.


Had the same problem, will post our solution in a few hours. (Don't have the source at home)

http://forum.codejock.com/forum_posts.asp?TID=12286 - http://forum.codejock.com/forum_posts.asp?TID=12286


-------------
Codejock support


Posted By: ABuenger
Date Posted: 25 March 2009 at 11:34am
void CMainFrame::OnSetPreviewMode(BOOL bPreview, CPrintPreviewState *pState)
{
   // Toggle CommandBars
   GetCommandBars()->OnSetPreviewMode(bPreview);

   // Toggle Tab Client
   m_wndClient.ShowWorkspace(!bPreview);

   // Toggle Docking Panes.
   m_dockingPaneFactory.GetPaneManager().OnSetPreviewMode(bPreview);

#if _MSC_VER < 1400
   inherited::OnSetPreviewMode(bPreview, pState);
#endif
}


Of course you have to change the lines in red.




-------------
Codejock support



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net