<?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 : Saving contents of windows &#039;underneath&#039; MenuBar</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Saving contents of windows &#039;underneath&#039; MenuBar]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 06:58:55 +0000</pubDate>
  <lastBuildDate>Fri, 09 Feb 2007 09:44:16 +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=6354</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[Saving contents of windows &#039;underneath&#039; MenuBar : Oleg To add to the problem, it...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6354&amp;PID=20246&amp;title=saving-contents-of-windows-underneath-menubar#20246</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2736">asparagusx</a><br /><strong>Subject:</strong> 6354<br /><strong>Posted:</strong> 09 February 2007 at 9:44am<br /><br /><P>Oleg</P><P>To add to the problem, it appears that when the popup menu is hidden (e.g. it is removed from the window), the client area underneath the popup (the area where our drawing is being displayed in) is totally invalidated e.g. InvalidateRect(NULL), rather than InvalidateRect(the screen area of the popup). I am making assumptions here re the drawing code, but my application is certainly receiving (via test to ::RectVisible) that the entire client are has been invalidated.</P><DIV>Anton</DIV>]]>
   </description>
   <pubDate>Fri, 09 Feb 2007 09:44:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6354&amp;PID=20246&amp;title=saving-contents-of-windows-underneath-menubar#20246</guid>
  </item> 
  <item>
   <title><![CDATA[Saving contents of windows &#039;underneath&#039; MenuBar : Oleg  Thanks for the reply....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6354&amp;PID=20245&amp;title=saving-contents-of-windows-underneath-menubar#20245</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2736">asparagusx</a><br /><strong>Subject:</strong> 6354<br /><strong>Posted:</strong> 09 February 2007 at 9:21am<br /><br /><P>Oleg</P><DIV>&nbsp;</DIV><DIV>Thanks for the reply. I have been looking at this in detail and I can see (from the source - we use 10.4.2), that CS_SAVEBITS is only used when creating Popup's and Shadow windows. The code for CXTPControlBars (or derived classes) does not appear to use this at all. I also tried setting <FONT size=2></DIV><P>bUseSystemSaveBitsStyle = TRUE, but it appears that is the default in any case and made no difference. When I use TrackPopupmenu, I certainly get redraw requests sent to the application. I used BCMenu before (CodeGuru) and it certainly was not a problem there. I am obviously optimising redraws as much as possible and already use MemDC where possible. I do believe that the solution is for Codejock to add CS_SAVEBITS to additional controls, such as CXTBControlBars and derivitaves. When I 'drag' toolbars accross our application (when repositioning them) the resulting loss of performance is substantial and end-users will not be able to use the system.</P><DIV></DIV><P>Thanks</P><DIV>Anton</FONT></DIV>]]>
   </description>
   <pubDate>Fri, 09 Feb 2007 09:21:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6354&amp;PID=20245&amp;title=saving-contents-of-windows-underneath-menubar#20245</guid>
  </item> 
  <item>
   <title><![CDATA[Saving contents of windows &#039;underneath&#039; MenuBar : Hi,  1 What version of Toolkit...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6354&amp;PID=20244&amp;title=saving-contents-of-windows-underneath-menubar#20244</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6354<br /><strong>Posted:</strong> 09 February 2007 at 9:03am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>1 What version of Toolkit do you have? Actually we use CS_SAVEBITS&nbsp; and I tried to show popup in our sample and it doesn't generate WM_PAINT messages at all.</DIV><DIV>&nbsp;</DIV><DIV>2. if performance of drawing is so critical, I very recommend you start cashing drawing, like we do in our Report and Ribbon - it gave us great perfomance.</DIV><DIV>&nbsp;</DIV><DIV>Something like:</DIV><DIV>&nbsp;</DIV><DIV>if ( (IsChanged() || m_bmpCache.GetSafeHandle() == 0))<BR>&nbsp;{<BR>&nbsp;&nbsp;CDC memDC;<BR>&nbsp;&nbsp;memDC.CreateCompatibleDC(&amp;dc);</DIV><DIV>&nbsp;&nbsp;m_bmpCache.DeleteObject();<BR>&nbsp;&nbsp;m_bmpCache.CreateCompatibleBitmap(&amp;dc, rc.Width(), rc.Height());</DIV><DIV><BR>&nbsp;&nbsp;CBitmap* pOldBitmap = memDC.SelectObject(&amp;m_bmpCache);</DIV><DIV>&nbsp;&nbsp;OnDraw(&amp;memDC);</DIV><DIV><BR>&nbsp;&nbsp;dc.BitBlt(0, 0, rc.right, rc.bottom, &amp;memDC, 0, 0, SRCCOPY);</DIV><DIV>&nbsp;&nbsp;memDC.SelectObject(pOldBitmap);<BR>&nbsp;}<BR>&nbsp;else<BR>&nbsp;{<BR>&nbsp;&nbsp;CXTPCompatibleDC memDC(&amp;dc, &amp;m_bmpCache);<BR>&nbsp;&nbsp;dc.BitBlt(0, 0, rc.right, rc.bottom, &amp;memDC, 0, 0, SRCCOPY);<BR>&nbsp;}<BR></DIV>]]>
   </description>
   <pubDate>Fri, 09 Feb 2007 09:03:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6354&amp;PID=20244&amp;title=saving-contents-of-windows-underneath-menubar#20244</guid>
  </item> 
  <item>
   <title><![CDATA[Saving contents of windows &#039;underneath&#039; MenuBar : Anybody any ideas about this....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6354&amp;PID=20242&amp;title=saving-contents-of-windows-underneath-menubar#20242</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2736">asparagusx</a><br /><strong>Subject:</strong> 6354<br /><strong>Posted:</strong> 09 February 2007 at 7:51am<br /><br />Anybody any ideas about this. It has actually turned out to be a serious issue as performance is of absolute importance in this application.<DIV>&nbsp;</DIV><DIV>Thank you in advance.</DIV><DIV>&nbsp;</DIV><DIV>Anton Heymann</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 09 Feb 2007 07:51:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6354&amp;PID=20242&amp;title=saving-contents-of-windows-underneath-menubar#20242</guid>
  </item> 
  <item>
   <title><![CDATA[Saving contents of windows &#039;underneath&#039; MenuBar : Hallo I am implementing the XTP...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6354&amp;PID=20196&amp;title=saving-contents-of-windows-underneath-menubar#20196</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2736">asparagusx</a><br /><strong>Subject:</strong> 6354<br /><strong>Posted:</strong> 08 February 2007 at 9:28am<br /><br /><P>Hallo</P><DIV>I am implementing the XTP library into a CAD (computer aided design) system and so far so good!</DIV><DIV>&nbsp;</DIV><DIV>However, I have come across an issue when displaying a 'context menu' e.g. user right clicks, the menu displays (I am using &nbsp;&nbsp;CXTPCommandBars::TrackPopupMenu(pSubMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, pMain,0,0,pMain-&gt;pCommandBars);<BR>)</DIV><DIV>&nbsp;</DIV><DIV>The menu displays correctly but when the menu is hidden, our application receives a large number of 'redraw requests', which then forces a refresh of the area previously under the contect menu.</DIV><DIV>&nbsp;</DIV><DIV>Question - is it possible to 'save' the contents of the underlying window(s), prior to displaying the context and then restoring it afterwards (e.g. CS_SAVEBITS | CS_BYTEALIGNWINDOW) to minimise calls to what could be very complex graphics.</DIV><DIV>&nbsp;</DIV><DIV>Anton Heymann</DIV>]]>
   </description>
   <pubDate>Thu, 08 Feb 2007 09:28:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6354&amp;PID=20196&amp;title=saving-contents-of-windows-underneath-menubar#20196</guid>
  </item> 
 </channel>
</rss>