Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - About OnSetPreviewMode
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

About OnSetPreviewMode

 Post Reply Post Reply
Author
Message
zaozao View Drop Down
Groupie
Groupie


Joined: 09 February 2009
Location: Japan
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaozao Quote  Post ReplyReply Direct Link To This Post Topic: About OnSetPreviewMode
    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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
zaozao View Drop Down
Groupie
Groupie


Joined: 09 February 2009
Location: Japan
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaozao Quote  Post ReplyReply Direct Link To This Post 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.
 
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post 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
Codejock support
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.