<?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 : Adding toolbar button dynamically</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Adding toolbar button dynamically]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 30 Apr 2026 15:53:16 +0000</pubDate>
  <lastBuildDate>Tue, 03 May 2011 17:58:56 +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=16769</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[Adding toolbar button dynamically : Solved.I have to clean the previously...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16769&amp;PID=64172&amp;title=adding-toolbar-button-dynamically#64172</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4505">FrankC</a><br /><strong>Subject:</strong> 16769<br /><strong>Posted:</strong> 03 May 2011 at 5:58pm<br /><br />Solved.<div><br></div><div>I have to clean the previously saved menu settings.</div><div><br></div><div>Thanks,</div><div>Frank</div>]]>
   </description>
   <pubDate>Tue, 03 May 2011 17:58:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16769&amp;PID=64172&amp;title=adding-toolbar-button-dynamically#64172</guid>
  </item> 
  <item>
   <title><![CDATA[Adding toolbar button dynamically : Thanks Oleg.According to your...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16769&amp;PID=64171&amp;title=adding-toolbar-button-dynamically#64171</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4505">FrankC</a><br /><strong>Subject:</strong> 16769<br /><strong>Posted:</strong> 03 May 2011 at 4:33pm<br /><br /><div><span ="Apple-tab-span" style="white-space:pre">T</span>hanks Oleg.</div><div><br></div><div>According to your suggestion, I have tried the following code when creating the mainframe menubar.</div><div><br></div><div>However, the added button does not show up. &nbsp;Do you think these code are correct?</div><div><br></div><div>Thanks,</div><div>Frank</div><div><br></div><div><div><span ="Apple-tab-span" style="white-space:pre">	CXTPCommandBars* pCommandBars = GetCommandBars();	</span></div><div><span ="Apple-tab-span" style="white-space:pre"><br></span></div><div><span ="Apple-tab-span" style="white-space:pre"></span><span ="Apple-tab-span" style="white-space:pre">	</span><span ="Apple-tab-span" style="white-space: pre; ">CXTPMenuBar</span>* pMenuBar = pCommandBars-&gt;SetMenu(_T("Menu Bar"), IDR_MAINFRAME);</div></div><div><span ="Apple-tab-span" style="white-space:pre"><br></span></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>CXTPControls* pzMenuControls =&nbsp;pMenuBar-&gt;GetControls();</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>CXTPControl* pNewControl = pzMenuControls-&gt;Add(xtpControlButton, 100, "Manage");</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>DWORD dwFlags = pNewControl-&gt;GetFlags();</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>dwFlags |= xtpFlagRightAlign;</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>pNewControl-&gt;SetFlags(dwFlags);</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>pNewControl-&gt;SetVisible(TRUE);</div>]]>
   </description>
   <pubDate>Tue, 03 May 2011 16:33:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16769&amp;PID=64171&amp;title=adding-toolbar-button-dynamically#64171</guid>
  </item> 
  <item>
   <title><![CDATA[Adding toolbar button dynamically : Hi,  just pToolBar-&amp;gt;GetCont...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16769&amp;PID=58739&amp;title=adding-toolbar-button-dynamically#58739</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 16769<br /><strong>Posted:</strong> 30 May 2010 at 3:14am<br /><br />Hi,<br /><br />just<br />pToolBar-&gt;GetControls()-&gt;Add(xtpControlButton, ...);]]>
   </description>
   <pubDate>Sun, 30 May 2010 03:14:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16769&amp;PID=58739&amp;title=adding-toolbar-button-dynamically#58739</guid>
  </item> 
  <item>
   <title><![CDATA[Adding toolbar button dynamically : I would like to add a button dynamically...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16769&amp;PID=58731&amp;title=adding-toolbar-button-dynamically#58731</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5667">sabapathy</a><br /><strong>Subject:</strong> 16769<br /><strong>Posted:</strong> 29 May 2010 at 2:38am<br /><br />I would like to add a button dynamically in the toolbar of my SDI application.<DIV>The toolbar type is <FONT size=2>CXTPToolBar.</FONT></DIV><DIV><FONT size=2>How can do it and specify the style &amp; type of control.</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Thanks</FONT></DIV>]]>
   </description>
   <pubDate>Sat, 29 May 2010 02:38:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16769&amp;PID=58731&amp;title=adding-toolbar-button-dynamically#58731</guid>
  </item> 
 </channel>
</rss>