<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : CMainFrame::OnSetPreviewMode not being called</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CMainFrame::OnSetPreviewMode not being called]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 09 Jun 2026 05:36:41 +0000</pubDate>
  <lastBuildDate>Tue, 18 Oct 2011 06:52:25 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=19078</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[CMainFrame::OnSetPreviewMode not being called : In a couple of the ToolkitPro...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19078&amp;PID=66619&amp;title=cmainframeonsetpreviewmode-not-being-called#66619</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4149">whudson</a><br /><strong>Subject:</strong> 19078<br /><strong>Posted:</strong> 18 October 2011 at 6:52am<br /><br />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&nbsp;CMainFrame::OnSetPreviewMode is not being called.&nbsp;<div><br></div><div>The view in the Codejock samples (RibbonMDISample and PrintPreview) is handling the print preview command and calling CView::DoPrintPreview, but the expected callback to&nbsp;CMainFrame::OnSetPreviewMode just doesn't happen. The MFC implementation of DoPrintPreview downcasts the main window to a&nbsp;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&nbsp;CXTPMDIFrameWnd as its base class).</div><div><br></div><div>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?</div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Tue, 18 Oct 2011 06:52:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19078&amp;PID=66619&amp;title=cmainframeonsetpreviewmode-not-being-called#66619</guid>
  </item> 
 </channel>
</rss>