<?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 : Tear off menu</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Tear off menu]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 05:31:39 +0000</pubDate>
  <lastBuildDate>Thu, 19 Nov 2009 15:42:49 +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=15664</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[Tear off menu : Well, it seems that I&amp;#039;ve...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15664&amp;PID=55014&amp;title=tear-off-menu#55014</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2876">DavidH</a><br /><strong>Subject:</strong> 15664<br /><strong>Posted:</strong> 19 November 2009 at 3:42pm<br /><br />Well, it seems that I've solved it myself.<br><br>To get to the tear-off menu, add<br><br>&nbsp; ON_XTP_CREATECOMMANDBAR()<br><br>to the MESSAGE_MAP of CMainFrame.<br><br><br>Then, add the following method:<br><br>int <br>CMainFrame::OnCreateCommandBar(LPCREATEBARSTRUCT lpCreateBar) {<br>&nbsp; if (lpCreateBar-&gt;nID == ID_TEAR_OFF_MENU) {<br>&nbsp;&nbsp;&nbsp; CXTPToolBar* pTearOffMenu((CXTPToolBar*)lpCreateBar-&gt;pCommandBar);<br>&nbsp;&nbsp;&nbsp; if (pTearOffMenu) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pTearOffMenu-&gt;EnableCustomization(FALSE);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pTearOffMenu-&gt;ShowExpandButton(FALSE);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return TRUE;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp; }<br>&nbsp; return FALSE;<br>}<br><br>Very simple, really, but it took me a day to figure it out :(<br><br>David.<br><br>]]>
   </description>
   <pubDate>Thu, 19 Nov 2009 15:42:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15664&amp;PID=55014&amp;title=tear-off-menu#55014</guid>
  </item> 
  <item>
   <title><![CDATA[Tear off menu : What is the best way to get rid...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15664&amp;PID=55007&amp;title=tear-off-menu#55007</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2876">DavidH</a><br /><strong>Subject:</strong> 15664<br /><strong>Posted:</strong> 19 November 2009 at 11:22am<br /><br />What is the best way to get rid of the Toolbar Options menu in a tear off menu.<br><br>The problem is that the toolbar holding the menu is created only when the menu is teared off, and that there's no real hook to use to disable it.<br><br>So I've tried to derive from CXTPPopupBar and call:<br>&nbsp;&nbsp;&nbsp; m_pTearOffBar-&gt;ShowExpandButton(FALSE);<br>&nbsp;&nbsp;&nbsp; m_pTearOffBar-&gt;SetContextMenuPresent(FALSE);<br>&nbsp;&nbsp;&nbsp; m_pTearOffBar-&gt;EnableCustomization(FALSE);<br><br>but this only results in CJ drawing the Expand button not in the title bar, but at the bottom of the window.<br><br>I've also tried to to put an ON_UPDATE_COMMAND_UI on XTP_ID_TOOLBAR_EXPAND, and make the the control invisible, but the code is not reached for some reason. I guess the message is handled at a higher level.<br><br>I'm sort of lost now.<br><br>All help is very much appreciated!<br><br>David.<br>]]>
   </description>
   <pubDate>Thu, 19 Nov 2009 11:22:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15664&amp;PID=55007&amp;title=tear-off-menu#55007</guid>
  </item> 
 </channel>
</rss>