<?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 : runtime extending menu</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : runtime extending menu]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 12 May 2026 21:00:19 +0000</pubDate>
  <lastBuildDate>Mon, 16 Jul 2007 13:36:48 +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=7604</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[runtime extending menu : Hi, you can set custom string...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7604&amp;PID=24495&amp;title=runtime-extending-menu#24495</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7604<br /><strong>Posted:</strong> 16 July 2007 at 1:36pm<br /><br /><P>Hi,</P><DIV>you can set custom string pControl-&gt;SetParameter or custom integer: pControl-&gt;SetTag</DIV>]]>
   </description>
   <pubDate>Mon, 16 Jul 2007 13:36:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7604&amp;PID=24495&amp;title=runtime-extending-menu#24495</guid>
  </item> 
  <item>
   <title><![CDATA[runtime extending menu : OK I found out how to add items,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7604&amp;PID=24492&amp;title=runtime-extending-menu#24492</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2967">adrien</a><br /><strong>Subject:</strong> 7604<br /><strong>Posted:</strong> 16 July 2007 at 11:54am<br /><br /><P>OK</P><P>I found out how to add items, and popups.&nbsp; It's pretty cool, can even set custom icons to a menu item.</P><P>One thing that would be really useful though would be an ability to set an LPARAM against a menu item (i.e. add an m_lParam member to CXTPControl)</P><P>Then when I get notified of a CXTPControlButton being pressed, I can resolve an associated object and route the message into it.&nbsp; That way I can add an unlimited number of menu items and menus and not have to use a range of command IDs, or different command IDs with all the associated guff that MFC requires.&nbsp; By storing my own object in the lparam I'd be able to retrieve it and multiplex all component messages through a single ID.</P>]]>
   </description>
   <pubDate>Mon, 16 Jul 2007 11:54:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7604&amp;PID=24492&amp;title=runtime-extending-menu#24492</guid>
  </item> 
  <item>
   <title><![CDATA[runtime extending menu : Hi  I&amp;#039;ve got a framework...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7604&amp;PID=24474&amp;title=runtime-extending-menu#24474</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2967">adrien</a><br /><strong>Subject:</strong> 7604<br /><strong>Posted:</strong> 15 July 2007 at 11:28pm<br /><br />Hi<DIV>&nbsp;</DIV><DIV>I've got a framework that I load components into.&nbsp; These components may choose to add menu items, or complete sub-menus to the main menu.</DIV><DIV>&nbsp;</DIV><DIV>However, there doesn't seem to be any way to do this?&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>the code I've seen uses CMenu for all menu manipulation.</DIV><DIV>&nbsp;</DIV><DIV>But there's no way to get the current menu, since with CommandBars, there's no HMENU installed into the main frame HWND, so the call to ::GetMenu(HWND) returns NULL.</DIV><DIV>&nbsp;</DIV><DIV>So i've had to edit XTPMenuBar.h to make m_hMenuDefault public so I can access it (there's no accessor function), but that's really ugly.</DIV><DIV>&nbsp;</DIV><DIV>Do you have any plans to write a real menu class?&nbsp; One that will be used instead of CMenu.&nbsp; CMenu is very old and nasty API, like when you append a menu item, it doesn't even give you any reference back to the new item, you have to search for it - hopefully you find the one you just added.</DIV><DIV>&nbsp;</DIV><DIV>I changed my code over to the CodeJock framework specifically to solve this dynamic menu modification problem, but it actually makes it worse, since I can't even call GetMenu any more.</DIV><DIV>&nbsp;</DIV><DIV>any hints?</DIV><DIV><BR>Adrien</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 15 Jul 2007 23:28:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7604&amp;PID=24474&amp;title=runtime-extending-menu#24474</guid>
  </item> 
 </channel>
</rss>