<?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 : Combobox in menu bar?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Combobox in menu bar?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 03:32:00 +0000</pubDate>
  <lastBuildDate>Wed, 21 Oct 2009 22:53:31 +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=9668</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[Combobox in menu bar? : Hi brianh, first of all , thanks...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=54056&amp;title=combobox-in-menu-bar#54056</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5595">steven123</a><br /><strong>Subject:</strong> 9668<br /><strong>Posted:</strong> 21 October 2009 at 10:53pm<br /><br /><P><FONT color=#000000>Hi brianh, first of all , thanks for you share of the idea.<img src="http://forum.codejock.com/smileys/smiley1.gif" border="0"></P><DIV></DIV>yes, as you said&nbsp; i have figured out the how to add a control in right-side&nbsp; of &nbsp;the command bar.<DIV><FONT color=#0000ff>J</FONT><FONT color=#000000>ust by adding a menu item at the end of the main meunbar, and set it's ID like ID_MYCOMBO, I initialize the menubar in mainframe.cpp:</FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff>int</FONT> CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl)</DIV><DIV>{</DIV><DIV>&nbsp;&nbsp;&nbsp; ......</DIV><DIV>&nbsp;&nbsp;&nbsp; <P><FONT color=#0000ff>if</FONT>(lpCreateControl-&gt;nID == ID_MYCOMBO)</P><P>{</P><P>CXTPControlComboBox* pComboBox = <FONT color=#0000ff>new</FONT> CXTPControlComboBox();</P><P>pComboBox -&gt;SetDropDownListStyle(TRUE);</P><P>pComboBox -&gt;SetWidth(180);</P><P>pComboBox -&gt;SetID(ID_MYCOMBO);</P><P>pComboBox -&gt;SetFlags(xtpFlagManualUpdate | xtpFlagRightAlign);</P><P>pComboBox -&gt;SetEditHint(_T(<FONT color=#a31515>"some strings"</FONT>));</P><P align=left>lpCreateControl-&gt;pControl = pComboBox ;</P><P><FONT color=#0000ff>return</FONT> TRUE;</P><P>} </P></DIV><DIV>.............</DIV><DIV>}</DIV><DIV>&nbsp;I needn't &nbsp;to switch menus on the fly . </DIV><DIV>&nbsp;</DIV></FONT>]]>
   </description>
   <pubDate>Wed, 21 Oct 2009 22:53:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=54056&amp;title=combobox-in-menu-bar#54056</guid>
  </item> 
  <item>
   <title><![CDATA[Combobox in menu bar? : Hi steven123, I used the following...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=53991&amp;title=combobox-in-menu-bar#53991</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=491">brianh</a><br /><strong>Subject:</strong> 9668<br /><strong>Posted:</strong> 19 October 2009 at 4:31am<br /><br /><P>Hi steven123, I used the following code to add a combo to the r/h side of the menu bar:</P><FONT size=2><P></FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>CXTPCommandBars</FONT></FONT><FONT size=2>* </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pCommandBars</FONT></FONT><FONT size=2> = </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>GetCommandBars</FONT></FONT><FONT size=2>() ;</P><DIV></FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>CXTPMenuBar</FONT></FONT><FONT size=2>* </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pMenuBar</FONT></FONT><FONT size=2> = </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pCommandBars</FONT></FONT><FONT size=2>-&gt;</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>GetMenuBar</FONT></FONT><FONT size=2>() ;</DIV><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// now add combo control to r/h side of menu</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>CXTPControls</FONT></FONT><FONT size=2>* </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pCtrls</FONT></FONT><FONT size=2> = </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pMenuBar</FONT></FONT><FONT size=2>-&gt;</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>GetControls</FONT></FONT><FONT size=2>() ;</P><P></FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>ASSERT</FONT></FONT><FONT size=2>( </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>NULL</FONT></FONT><FONT size=2> == </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pCtrls</FONT></FONT><FONT size=2>-&gt;</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>FindControl</FONT></FONT><FONT size=2>(</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>ID_MYCOMBO</FONT></FONT><FONT size=2>) ) ; </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// should NOT already exist!</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>CXTPControlComboBox</FONT></FONT><FONT size=2>* </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pMyCB</FONT></FONT><FONT size=2> = (</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>CXTPControlComboBox</FONT></FONT><FONT size=2>*)</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pCtrls</FONT></FONT><FONT size=2>-&gt;</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>Add</FONT></FONT><FONT size=2>( </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>xtpControlComboBox</FONT></FONT><FONT size=2>, </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>ID_MYCOMBO</FONT></FONT><FONT size=2>, </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>NULL</FONT></FONT><FONT size=2>, -1, </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>TRUE</FONT></FONT><FONT size=2> ) ;</P></FONT><FONT size=2><P></FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pMyCB</FONT></FONT><FONT size=2>-&gt;</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>SetCaption</FONT></FONT><FONT size=2>(</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>_T</FONT></FONT><FONT size=2>(</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"My Combo"</FONT></FONT><FONT size=2>));</P><P></FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pMyCB</FONT></FONT><FONT size=2>-&gt;</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>SetWidth</FONT></FONT><FONT size=2>(180);</P><P></FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pMyCB</FONT></FONT><FONT size=2>-&gt;</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>SetDropDownListStyle</FONT></FONT><FONT size=2>( </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>FALSE</FONT></FONT><FONT size=2> ) ; </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// dropdown list mode (no edit)</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>pMyCB</FONT></FONT><FONT size=2>-&gt;</FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>SetFlags</FONT></FONT><FONT size=2>( </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>xtpFlagManualUpdate</FONT></FONT><FONT size=2> | </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>xtpFlagNoMovable</FONT></FONT><FONT size=2> | </FONT><FONT color=#030003 size=2><FONT color=#030003 size=2>xtpFlagRightAlign</FONT></FONT><FONT size=2> ) ;</P><DIV></DIV><DIV>In my case I need to switch menus on the fly so I placed this code where I switch the menus, but I expect you will probably want to put it in OnCreate() or wherever you initialize the command bars.</DIV><DIV>&nbsp;</DIV><DIV>NB: The last parameter to the CXTPControls::Add() method call is bTemporary, which I have set to TRUE, but I can't remember what this actually does, so you may need to experiment with it or check out the source code to see if you need to set it differently.</DIV><DIV>&nbsp;</DIV><DIV>I don't know if this is the recommended method to use, but it works for me. :)&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>brian</FONT></DIV>]]>
   </description>
   <pubDate>Mon, 19 Oct 2009 04:31:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=53991&amp;title=combobox-in-menu-bar#53991</guid>
  </item> 
  <item>
   <title><![CDATA[Combobox in menu bar? :   brianh wrote: I can&amp;#039;t...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=53910&amp;title=combobox-in-menu-bar#53910</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5595">steven123</a><br /><strong>Subject:</strong> 9668<br /><strong>Posted:</strong> 16 October 2009 at 3:39am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by brianh" alt="Originally posted by brianh" style="vertical-align: text-bottom;" /> <strong>brianh wrote:</strong><br /><br /><P>I can't find any sample projects that have a combo in the menu bar (as shown in your bitmap), but it doesn't matter, I figured out how to do it myself.</P><DIV></DIV><DIV></DIV>Thanks.</td></tr></table> <DIV>&nbsp;</DIV><DIV><strong>Hi brianh, i have the same question to you. But i have not figured out it. Can you share you idea with? thank you .</strong></DIV>]]>
   </description>
   <pubDate>Fri, 16 Oct 2009 03:39:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=53910&amp;title=combobox-in-menu-bar#53910</guid>
  </item> 
  <item>
   <title><![CDATA[Combobox in menu bar? : Hello, is there a sample for ActiveX?I&amp;#039;m...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=36079&amp;title=combobox-in-menu-bar#36079</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1405">Onur</a><br /><strong>Subject:</strong> 9668<br /><strong>Posted:</strong> 01 June 2008 at 1:06am<br /><br />Hello, is there a sample for ActiveX?<br>I'm not using MFC..<br>]]>
   </description>
   <pubDate>Sun, 01 Jun 2008 01:06:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=36079&amp;title=combobox-in-menu-bar#36079</guid>
  </item> 
  <item>
   <title><![CDATA[Combobox in menu bar? : try this example \Codejock Software\MFC\Xtreme...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=32636&amp;title=combobox-in-menu-bar#32636</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3850">SunIron</a><br /><strong>Subject:</strong> 9668<br /><strong>Posted:</strong> 27 March 2008 at 9:24am<br /><br />try this example<br />\Codejock Software\MFC\Xtreme ToolkitPro v11.2.2\Samples\CommandBars\DynamicPopups\]]>
   </description>
   <pubDate>Thu, 27 Mar 2008 09:24:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=32636&amp;title=combobox-in-menu-bar#32636</guid>
  </item> 
  <item>
   <title><![CDATA[Combobox in menu bar? : I can&amp;#039;t find any sample projects...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=31562&amp;title=combobox-in-menu-bar#31562</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=491">brianh</a><br /><strong>Subject:</strong> 9668<br /><strong>Posted:</strong> 25 February 2008 at 8:24am<br /><br /><P>I can't find any sample projects that have a combo in the menu bar (as shown in your bitmap), but it doesn't matter, I figured out how to do it myself.</P><DIV></DIV><DIV></DIV>Thanks.]]>
   </description>
   <pubDate>Mon, 25 Feb 2008 08:24:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=31562&amp;title=combobox-in-menu-bar#31562</guid>
  </item> 
  <item>
   <title><![CDATA[Combobox in menu bar? : Yes  ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=31478&amp;title=combobox-in-menu-bar#31478</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 9668<br /><strong>Posted:</strong> 22 February 2008 at 11:44am<br /><br />Yes<br><br><img src="uploads/20080222_114433_55.png" height="149" width="653" border="0"><br>]]>
   </description>
   <pubDate>Fri, 22 Feb 2008 11:44:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=31478&amp;title=combobox-in-menu-bar#31478</guid>
  </item> 
  <item>
   <title><![CDATA[Combobox in menu bar? : Hi, is it possible to add a combobox...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=31474&amp;title=combobox-in-menu-bar#31474</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=491">brianh</a><br /><strong>Subject:</strong> 9668<br /><strong>Posted:</strong> 22 February 2008 at 10:31am<br /><br />Hi, is it possible to add a combobox to the menu bar as a top level item, preferably on the far right hand side away from the other menu items?<DIV>&nbsp;</DIV><DIV>Thanks.</DIV><DIV>&nbsp;</DIV><DIV>Brian</DIV>]]>
   </description>
   <pubDate>Fri, 22 Feb 2008 10:31:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9668&amp;PID=31474&amp;title=combobox-in-menu-bar#31474</guid>
  </item> 
 </channel>
</rss>