<?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 : Command bar messages and bitmap</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Command bar messages and bitmap]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 Apr 2026 03:32:26 +0000</pubDate>
  <lastBuildDate>Fri, 27 Mar 2009 01:56:34 +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=13813</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[Command bar messages and bitmap : Hi,  You have catch itit in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13813&amp;PID=47207&amp;title=command-bar-messages-and-bitmap#47207</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 13813<br /><strong>Posted:</strong> 27 March 2009 at 1:56am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>You have catch it&nbsp;it in CMainFrame.</DIV>]]>
   </description>
   <pubDate>Fri, 27 Mar 2009 01:56:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13813&amp;PID=47207&amp;title=command-bar-messages-and-bitmap#47207</guid>
  </item> 
  <item>
   <title><![CDATA[Command bar messages and bitmap : Oleg: In my CDocument derived...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13813&amp;PID=47186&amp;title=command-bar-messages-and-bitmap#47186</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4140">JerryEvans</a><br /><strong>Subject:</strong> 13813<br /><strong>Posted:</strong> 26 March 2009 at 10:47am<br /><br />Oleg: In my CDocument derived class<br><br>&nbsp;&nbsp;&nbsp; ON_XTP_INITCOMMANDSPOPUP(OnInitCommandsPopup)<br><br>Nothing is caught. I can see the notes in XTPCommandBarsDefines.h but this does not seem to work. Is there a message generated when a specific dropd-own menu is about to be displayed? OnInitCommandsPopup seems to be a little bit generic.<br>]]>
   </description>
   <pubDate>Thu, 26 Mar 2009 10:47:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13813&amp;PID=47186&amp;title=command-bar-messages-and-bitmap#47186</guid>
  </item> 
  <item>
   <title><![CDATA[Command bar messages and bitmap : Oleg, thanks. re the bitmap -...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13813&amp;PID=47178&amp;title=command-bar-messages-and-bitmap#47178</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4140">JerryEvans</a><br /><strong>Subject:</strong> 13813<br /><strong>Posted:</strong> 26 March 2009 at 7:24am<br /><br />Oleg, thanks. <br><br>re the bitmap - the extra is that which VS always shows in its editor. There are 9 items defined in the toolbar. Why should the last two not display as bitmaps?<br><br><font size="2" face="Courier New, Courier, mono">IDR_TOOLBAR_EDITOR TOOLBAR&nbsp; 16, 15<br>BEGIN<br>&nbsp;&nbsp;&nbsp; BUTTON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID_EDIT_SELECTALL<br>&nbsp;&nbsp;&nbsp; BUTTON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID_EDIT_UNDO<br>&nbsp;&nbsp;&nbsp; BUTTON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID_EDIT_REDO<br>&nbsp;&nbsp;&nbsp; SEPARATOR<br>&nbsp;&nbsp;&nbsp; BUTTON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID_EDIT_FIND<br>&nbsp;&nbsp;&nbsp; BUTTON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID_FINDER_SEARCH<br>&nbsp;&nbsp;&nbsp; SEPARATOR<br>&nbsp;&nbsp;&nbsp; BUTTON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID_EDIT_REPLACE<br>&nbsp;&nbsp;&nbsp; BUTTON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID_FINDER_REPLACE<br>&nbsp;&nbsp;&nbsp; SEPARATOR<br>&nbsp;&nbsp;&nbsp; BUTTON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID_FINDER_MATCHCASE<br>&nbsp;&nbsp;&nbsp; BUTTON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID_FINDER_WHOLEWORD<br>END</font><br><br><br><br>]]>
   </description>
   <pubDate>Thu, 26 Mar 2009 07:24:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13813&amp;PID=47178&amp;title=command-bar-messages-and-bitmap#47178</guid>
  </item> 
  <item>
   <title><![CDATA[Command bar messages and bitmap : Hi,  1. Catch WM_XTP_INITCOMMANDSPOPUP...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13813&amp;PID=47138&amp;title=command-bar-messages-and-bitmap#47138</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 13813<br /><strong>Posted:</strong> 26 March 2009 at 2:00am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>1. Catch WM_XTP_INITCOMMANDSPOPUP it called when Popup become visible.</DIV><DIV>&nbsp;</DIV><DIV>2. I see you have 9 buttons on toolbar but 10 in bitmap.</DIV>]]>
   </description>
   <pubDate>Thu, 26 Mar 2009 02:00:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13813&amp;PID=47138&amp;title=command-bar-messages-and-bitmap#47138</guid>
  </item> 
  <item>
   <title><![CDATA[Command bar messages and bitmap : Hello.2 questions for the panel:1....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13813&amp;PID=47132&amp;title=command-bar-messages-and-bitmap#47132</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4140">JerryEvans</a><br /><strong>Subject:</strong> 13813<br /><strong>Posted:</strong> 25 March 2009 at 9:52pm<br /><br />Hello.<br><br>2 questions for the panel:<br><br>1. In my frame class I assemble a command bar whic creates a drop-down menu:<br><br><font size="2" face="Courier New, Courier, mono">// views<br>&nbsp;&nbsp;&nbsp; CXTPToolBar* pToolBarViews = pCB-&gt;Add(_T("Views"), xtpBarTop);<br>&nbsp;&nbsp;&nbsp; if (pToolBarViews)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // set up the bitmap<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pCB-&gt;GetImageManager()-&gt;SetIcons(IDR_TOOLBAR_VIEWS);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pToolBarViews-&gt;SetBarID(IDR_TOOLBAR_VIEWS);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPControlPopup* p = (CXTPControlPopup*)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pToolBarViews-&gt;GetControls()-&gt;Add(xtpControlButtonPopup,ID_VIEW_SELECT);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (p)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; p-&gt;SetStyle(xtpButtonCaption);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; p-&gt;SetCaption("Select Views");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CMenu menu;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; menu.LoadMenu(IDR_SYSTEM);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // we are only interested the View submenu<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; p-&gt;SetCommandBar(menu.GetSubMenu(1));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pToolBarViews-&gt;GetControls()-&gt;Add(xtpControlButton,ID_VIEW_CONCISE);<br><br></font>How can I dynamically modify the menu? <br><br>I have mapped an event handler like this:<br><br><font size="2" face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; ON_XTP_EXECUTE(ID_VIEW_SELECT,OnExecuteViewSelect)</font><br><br>with an implementation as below:<br><br><font size="2" face="Courier New, Courier, mono">void CAppDoc::OnExecuteViewSelect(NMHDR* pNMHDR, LRESULT* pResult)<br>{<br>&nbsp;&nbsp;&nbsp; NMXTPCONTROL* tagNMCONTROL = (NMXTPCONTROL*)pNMHDR;<br>&nbsp;&nbsp;&nbsp; if (tagNMCONTROL)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPControlPopup* pControl = (CXTPControlPopup*)tagNMCONTROL-&gt;pControl;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (pControl)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DBMSG(CMsg("OnExecuteViewSelect"));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>}<br></font><br>but it is never called. The XTP_EXECUTE works fine for combo box controls on similiar toolbars.<br><br>I'd hope to get a pointer to a CMenu or similar and then add/delete/modify the menu items as appropriate in the context. So far nothing seems to work.<br><br>BTW The event handlers for each of the IDR_SYSTEM submenus are called&nbsp; ...<br><br>2. Toolbar bitmaps - 2 toolbars created in the same manner behave differently. The problem is that a toolbar with a mixture of button and combo controls refuses to display the bitmaps for the final 2 controls created with:<br><br><font size="2" face="Courier New, Courier, mono">pTBE-&gt;GetControls()-&gt;Add(xtpControlButton,ID_FINDER_MATCHCASE);</font><br><br>What I see is shown below (excuse the rubbish graphics - I've yet to work out why the bitmap is always rendered as 8bpp):<br><br><img src="file:///u:/temp/moz-screenshot-7.jpg" border="0"><img src="uploads/20090325_214130_s-r-toolbar.png" height="26" width="496" border="0"><br><br>Here is a snap of the original in the VS2008 editor - both toolbars have 9 elements and are 16pixels wide by 15 pixels high ...<br><br><img src="uploads/20090325_214516_s-r-vc2008.png" height="42" width="786" border="0"><br><br>Any help greatly appreciated.<br><br>This all being performed with VS2008 SP1 running on XPSP3 using XTP 1202<br><br>Thx++<br><br>Jerry<br><br>]]>
   </description>
   <pubDate>Wed, 25 Mar 2009 21:52:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13813&amp;PID=47132&amp;title=command-bar-messages-and-bitmap#47132</guid>
  </item> 
 </channel>
</rss>