<?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 : [solved] how to add submenu?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : [solved] how to add submenu?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 05:24:57 +0000</pubDate>
  <lastBuildDate>Tue, 15 Nov 2016 00:37:27 +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=23187</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[[solved] how to add submenu? : Hi,Thank you for your response....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23187&amp;PID=75338&amp;title=solved-how-to-add-submenu#75338</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9096">ksc4703</a><br /><strong>Subject:</strong> 23187<br /><strong>Posted:</strong> 15 November 2016 at 12:37am<br /><br />Hi,&nbsp;<img src="http://forum.codejock.com/smileys/smiley1.gif" border="0" alt="Smile" title="Smile" /><div><br></div><div>Thank you for your response. It works well.</div><div><br></div><div>Problem solved.</div>]]>
   </description>
   <pubDate>Tue, 15 Nov 2016 00:37:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23187&amp;PID=75338&amp;title=solved-how-to-add-submenu#75338</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] how to add submenu? :    CXTPCommandBars* pCommandBars...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23187&amp;PID=75323&amp;title=solved-how-to-add-submenu#75323</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23187<br /><strong>Posted:</strong> 11 November 2016 at 12:07pm<br /><br /><table width="99%"><tr><td><pre class="BBcode">&nbsp; &nbsp; CXTPCommandBars* pCommandBars = GetCommandBars();<div>&nbsp; &nbsp; CXTPMenuBar* pMenuBar = pCommandBars-&gt;SetMenu(_T("Menu Bar"), IDR_MAINFRAME);</div><div><br></div><div>&nbsp; &nbsp; CXTPControls* pControls &nbsp; &nbsp; &nbsp; &nbsp;= pMenuBar-&gt;GetControls();</div><div>&nbsp; &nbsp; CXTPControl* &nbsp;pControl &nbsp; &nbsp; &nbsp; &nbsp;= pControls-&gt;GetAt(5); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // &lt;== "Tools"</div><div>&nbsp; &nbsp; CXTPControls* pUtilCtrls &nbsp; &nbsp;= pControl-&gt;GetCommandBar()-&gt;GetControls();</div><div><br></div><div>&nbsp; &nbsp; CXTPControl* pSubMenuItemCtrl = pUtilCtrls-&gt;GetAt(2); &nbsp; &nbsp;// &lt;== "Item3"<font color="#00cc00" style="line-height: 16.8px;">&nbsp;</font><span style="line-height: 16.8px;">&nbsp;<br><br></span></div><span style="line-height: 16.8px;">// I don't know how change &nbsp;usual type of menu item to popup. Just delete and create new.</span><div>&nbsp; &nbsp; <font color="#00cc00">pUtilCtrls-&gt;Remove(pSubMenuItemCtrl);</font></div><div><br></div><div>&nbsp;// make some menu for dynamic menu.</div><div>&nbsp; &nbsp; CMenu SubMenu;</div><div>&nbsp; &nbsp; SubMenu.CreatePopupMenu();</div><div><br></div><div>&nbsp; &nbsp; SubMenu.AppendMenu(MF_BYPOSITION | MF_STRING, IDD_DYNAMIC+1, _T("Item3-1"));</div><div>&nbsp; &nbsp; SubMenu.AppendMenu(MF_BYPOSITION | MF_STRING, IDD_DYNAMIC+2, _T("Item3-2"));</div><div>&nbsp; &nbsp; SubMenu.AppendMenu(MF_BYPOSITION | MF_STRING, IDD_DYNAMIC+3, _T("Item3-3"));</div><div><br></div><div>&nbsp;<font color="#00cc00"> &nbsp; CMenu SubSubMenu;</font></div><div><font color="#00cc00">&nbsp; &nbsp; SubSubMenu.CreatePopupMenu();</font></div><div><font color="#00cc00">&nbsp; &nbsp; SubSubMenu.InsertMenu(0, MF_BYPOSITION | MF_POPUP, (UINT_PTR)SubMenu.m_hMenu, _T("Item3"));</font></div><div><font color="#00cc00">&nbsp; &nbsp;&nbsp;</font></div><font color="#00cc00">&nbsp; &nbsp; pUtilCtrls-&gt;AddMenuItem(&amp;SubSubMenu, 0);</font></pre></td></tr></table>]]>
   </description>
   <pubDate>Fri, 11 Nov 2016 12:07:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23187&amp;PID=75323&amp;title=solved-how-to-add-submenu#75323</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] how to add submenu? : hi!i&amp;#039;m trying to add submenu...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23187&amp;PID=75285&amp;title=solved-how-to-add-submenu#75285</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9096">ksc4703</a><br /><strong>Subject:</strong> 23187<br /><strong>Posted:</strong> 06 November 2016 at 9:47pm<br /><br /><div>hi!</div><div><br></div><div>i'm trying to add submenu as a popup item.</div><div><br></div><div>My project does not have a red box menu below.</div><div><br></div><div><img src="uploads/9096/Menu2.jpg" height="157" width="546" border="0" /><br></div><div><br></div> i want to makes dynamic submenu.<div><br></div><div><br><div><div>CXTPCommandBars* pCommandBars = GetCommandBars();</div><div>CXTPMenuBar* pMenuBar = pCommandBars-&gt;SetMenu(_T("Menu Bar"), IDR_MAIN_MENU);&nbsp;</div><div><br></div><div>CXTPControls* pControls = pMenuBar-&gt;GetControls();</div><div>CXTPControl* pControl = pControls-&gt;GetAt(5); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // &lt;== "Tools"</div><div>CXTPControls* pUtilCtrls = pControl-&gt;GetCommandBar()-&gt;GetControls();</div><div><br></div><div>CXTPControl* pSubMenuItemCtrl = pUtilCtrls-&gt;GetAt(2); &nbsp; &nbsp;// &lt;== "Item3"</div><div><br></div><div>// make some menu for dynamic menu.</div><div>CMenu SubMenu;</div><div><div>SubMenu.CreatePopupMenu();</div><div><span ="apple-tab-span"="" style="white-space:pre">	</span></div><div>InsertMenu(SubMenu, 0, MF_BYPOSITION | MF_STRING, IDD_DYNAMIC+1, _T("Item3-1"));</div><div>InsertMenu(SubMenu, 0, MF_BYPOSITION | MF_STRING, IDD_DYNAMIC+2, _T("Item3-2"));</div><div>InsertMenu(SubMenu, 0, MF_BYPOSITION | MF_STRING, IDD_DYNAMIC+3, _T("Item3-3"));</div></div><div><br></div><div><div>pSubMenuItemCtrl -&gt;GetControls()-&gt;AddMenuItem(&amp;SubMenu, 0);</div><div>pSubMenuItemCtrl -&gt;GetControls()-&gt;AddMenuItem(&amp;SubMenu, 1);</div><div>pSubMenuItemCtrl -&gt;GetControls()-&gt;AddMenuItem(&amp;SubMenu, 2);</div></div></div><div><br></div><div>but result is below.</div><div><br></div><div><img src="uploads/9096/Menu4.jpg" height="192" width="474" border="0" /><br></div></div><div><br></div><div><span style=": rgb248, 248, 252;">How to do this?</span></div><div><span style=": rgb248, 248, 252;"><br></span></div>]]>
   </description>
   <pubDate>Sun, 06 Nov 2016 21:47:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23187&amp;PID=75285&amp;title=solved-how-to-add-submenu#75285</guid>
  </item> 
 </channel>
</rss>