<?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 : How to get submenu control?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : How to get submenu control?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 02:09:47 +0000</pubDate>
  <lastBuildDate>Fri, 22 Feb 2008 03:47:59 +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=9664</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[How to get submenu control? : Here&amp;#039;s what I do, formatting...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9664&amp;PID=31463&amp;title=how-to-get-submenu-control#31463</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1305">Simon HB9DRV</a><br /><strong>Subject:</strong> 9664<br /><strong>Posted:</strong> 22 February 2008 at 3:47am<br /><br />Here's what I do, formatting is lost when pasting here :-(<DIV>&nbsp;</DIV><DIV><FONT face="Courier New, Courier, mono">//<BR>//&nbsp;Popup a menu.<BR>//<BR>void CMainFrame::TrackPopupMenu(const CString&amp; strTitle,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const CPoint&amp;&nbsp; point)<BR>{<BR>&nbsp;CXTPCommandBars*&nbsp;pCommandBars&nbsp;&nbsp;&nbsp;&nbsp; = MainFrame().GetCommandBars();<BR>&nbsp;CXTPMenuBar*&nbsp;&nbsp;pMenuBar&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = pCommandBars-&gt;GetMenuBar();<BR>&nbsp;int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nMenuCount&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = pMenuBar-&gt;GetControlCount();<BR>&nbsp;int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nIndex&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0;<BR>&nbsp;CXTPCommandBar*&nbsp;&nbsp;pChildCommandBar = NULL;</FONT></DIV><DIV><FONT face="Courier New, Courier, mono">&nbsp;//<BR>&nbsp;//&nbsp;Find menu.<BR>&nbsp;//<BR>&nbsp;for (nIndex = 0; nIndex &lt; nMenuCount; nIndex++)<BR>&nbsp;{<BR>&nbsp;&nbsp;CXTPControl*&nbsp;pControl&nbsp;&nbsp; = pMenuBar-&gt;GetControl(nIndex);<BR>&nbsp;&nbsp;CString&nbsp;&nbsp;&nbsp;strCaption = pControl-&gt;GetCaption();</FONT></DIV><DIV><FONT face="Courier New, Courier, mono">&nbsp;&nbsp;TRACE(_T("Menu %d &#091;%s&#093;\n"), nIndex, strCaption);</FONT></DIV><DIV><FONT face="Courier New, Courier, mono">&nbsp;&nbsp;strCaption.Remove(_T('&amp;'));</FONT></DIV><DIV><FONT face="Courier New, Courier, mono">&nbsp;&nbsp;if (strCaption.CompareNoCase(strTitle) == 0)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;pChildCommandBar = pControl-&gt;GetCommandBar();<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;}<BR>&nbsp;}</FONT></DIV><DIV><FONT face="Courier New, Courier, mono">&nbsp;//<BR>&nbsp;//&nbsp;Owner.<BR>&nbsp;//<BR>&nbsp;if (pChildCommandBar != NULL)<BR>&nbsp;{<BR>&nbsp;&nbsp;CWnd* pWndPopupOwner = &amp;MainFrame();</FONT></DIV><DIV><FONT face="Courier New, Courier, mono">&nbsp;&nbsp;CXTPCommandBars::TrackPopupMenu((CXTPPopupBar*)pChildCommandBar,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TPM_RIGHTBUTTON,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;point.x,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;point.y,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pWndPopupOwner,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0);<BR>&nbsp;}<BR>}</FONT></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 22 Feb 2008 03:47:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9664&amp;PID=31463&amp;title=how-to-get-submenu-control#31463</guid>
  </item> 
  <item>
   <title><![CDATA[How to get submenu control? : Hi oleg, again that I have problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9664&amp;PID=31462&amp;title=how-to-get-submenu-control#31462</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3270">hikaroute</a><br /><strong>Subject:</strong> 9664<br /><strong>Posted:</strong> 22 February 2008 at 3:37am<br /><br />Hi oleg,<DIV>again that I have problem to&nbsp;you.&nbsp; But this problem is the big for me.&nbsp; Now I need to get the sub menu control from my main menu. like this.</DIV><DIV>&nbsp;</DIV><DIV>&amp;File</DIV><DIV>- &amp;New</DIV><DIV>- &amp;Open</DIV><DIV>- &amp;Save</DIV><DIV>- E&amp;xit</DIV><DIV>&nbsp;</DIV><DIV>I make menu from XTPMenuBar.</DIV><DIV>&nbsp;</DIV><DIV>Now I want to get the control that contain submenu like "New" or "Open"&nbsp;to set&nbsp;the new&nbsp;icon on it,&nbsp;change name or set enable/disable.</DIV><DIV>&nbsp;</DIV><DIV>Thank you so much.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 22 Feb 2008 03:37:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9664&amp;PID=31462&amp;title=how-to-get-submenu-control#31462</guid>
  </item> 
 </channel>
</rss>