<?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 : A derived CXTPToolBar and customizati&#111;n</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : A derived CXTPToolBar and customizati&#111;n]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 21 Apr 2026 17:58:25 +0000</pubDate>
  <lastBuildDate>Mon, 08 Aug 2005 16:19:41 +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=2690</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[A derived CXTPToolBar and customizati&#111;n : Oleg,  Thanks for the reply....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2690&amp;PID=8063&amp;title=a-derived-cxtptoolbar-and-customization#8063</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1233">mwest</a><br /><strong>Subject:</strong> 2690<br /><strong>Posted:</strong> 08 August 2005 at 4:19pm<br /><br />Oleg,<br><br>Thanks for the reply.&nbsp; Your PS saved me! <img src="http://forum.codejock.com/smileys/smiley17.gif" border="0"><br><br>However, I found out the hard way that one should not use pointers tocontrols in a toolbar.&nbsp; It seems that LoadCommandBars() createsnew objects.&nbsp; So, anytime I need to reference a control, I have touse the FindControl() method.&nbsp; It is no big deal and it is betterprogramming methodology.<br><br>Thanks again for your help!!!<br>]]>
   </description>
   <pubDate>Mon, 08 Aug 2005 16:19:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2690&amp;PID=8063&amp;title=a-derived-cxtptoolbar-and-customization#8063</guid>
  </item> 
  <item>
   <title><![CDATA[A derived CXTPToolBar and customizati&#111;n : You must instead DECLARE_DYNCR...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2690&amp;PID=8014&amp;title=a-derived-cxtptoolbar-and-customization#8014</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2690<br /><strong>Posted:</strong> 05 August 2005 at 11:10pm<br /><br /><P>You must instead&nbsp; DECLARE_DYNCREATE/IMPLEMENT_DYNCREATE</P><P>use</P><FONT size=2><FONT size=2><P>DECLARE_XTP_COMMANDBAR/</FONT>IMPLEMENT_XTP_COMMANDBAR</P><P>&nbsp;</P><P>ps. For custom CXTPControl:</P><FONT size=2><P>DECLARE_XTP_CONTROL/<FONT size=2>IMPLEMENT_XTP_CONTROL</P></FONT></FONT></FONT>]]>
   </description>
   <pubDate>Fri, 05 Aug 2005 23:10:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2690&amp;PID=8014&amp;title=a-derived-cxtptoolbar-and-customization#8014</guid>
  </item> 
  <item>
   <title><![CDATA[A derived CXTPToolBar and customizati&#111;n : How do you use a custom derived...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2690&amp;PID=8013&amp;title=a-derived-cxtptoolbar-and-customization#8013</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1233">mwest</a><br /><strong>Subject:</strong> 2690<br /><strong>Posted:</strong> 05 August 2005 at 3:25pm<br /><br />How do you use a custom derived CXTPToolBar class and still keep toolbar customization?<br><br><strong>Problem:</strong><br>Getting an “An unsupported operation was attempted” error when the SaveCommandBars method is executed.<br><br><strong>References:</strong><br>Online Help – use index for ‘SetToolBarClass’<br>Online Help – use index for ‘cxtpcommandbars’ (look at Add method)<br>Forum -  http://forum.codejock.com/forum_posts.asp?TID=1932&amp;K W=SetToolBarClass<br><br><strong>Demonstration:</strong><br>To see the error, use the ‘Notifications’ sample in ‘…\Samples\CommandBars\Notifications’.&nbsp; Use a custom Toolbar:<br><u>1)</u>&nbsp; Create a new toolbar class<br><br><table width="99%"><tr><td><pre class="BBcode"><br>class CXTPToolBarEx : public CXTPToolBar&nbsp; <br>{<br>public:<br>&nbsp;&nbsp;&nbsp; DECLARE_DYNCREATE(CXTPToolBarEx)<br><br><br>&nbsp;&nbsp;&nbsp; CXTPToolBarEx();<br>&nbsp;&nbsp;&nbsp; virtual ~CXTPToolBarEx();<br><br>protected:<br>&nbsp;&nbsp;&nbsp; //{{AFX_MSG(CXTPToolBarEx)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // NOTE - the ClassWizard will add and remove member functions here.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; DO NOT EDIT what you see in these blocks of generated code !<br>&nbsp;&nbsp;&nbsp; //}}AFX_MSG<br>&nbsp;&nbsp;&nbsp; DECLARE_MESSAGE_MAP()<br>};<br></pre></td></tr></table><br><br><u>2)</u>&nbsp; Define it:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>IMPLEMENT_DYNCREATE(CXTPToolBarEx, CXTPToolBar)<br><br>BEGIN_MESSAGE_MAP(CXTPToolBarEx, CXTPToolBar)<br>&nbsp;&nbsp;&nbsp; //{{AFX_MSG_MAP(CXTPToolBarEx)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // NOTE - the ClassWizard will add and remove mapping macros here.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; DO NOT EDIT what you see in these blocks of generated code!<br>&nbsp;&nbsp;&nbsp; //}}AFX_MSG_MAP<br>END_MESSAGE_MAP()<br><br>CXTPToolBarEx::CXTPToolBarEx()<br>{<br><br>}<br><br>CXTPToolBarEx::~CXTPToolBarEx()<br>{<br><br>}<br></pre></td></tr></table><br><br><u>3.</u>&nbsp; Switch the Toolbars in CMainFrame::OnCreate().&nbsp;Can do this in two different ways.&nbsp; Both produce the same error:<br><br><u>A.</u>&nbsp; <br><table width="99%"><tr><td><pre class="BBcode"><br>CXTPToolBar* pToolBar = (CXTPToolBar*)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pCommandBars-&gt;Add(_T("Standard"), xtpBarTop, RUNTIME_CLASS(CXTPToolBarEx));<br>&nbsp;&nbsp;&nbsp; if (!pToolBar || !pToolBar-&gt;LoadToolBar(IDR_MAINFRAME))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TRACE0("Failed to create toolbar\n");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return -1;<br>&nbsp;&nbsp;&nbsp; }<br></pre></td></tr></table><br><br><u>B.</u><br><table width="99%"><tr><td><pre class="BBcode"><br> pCommandBars-&gt;SetToolBarClass(RUNTIME_CLASS(CXTPToolBar Ex));<br>CXTPToolBar* pToolBar = (CXTPToolBar*)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pCommandBars-&gt;Add(_T("Standard"), xtpBarTop);<br>&nbsp;&nbsp;&nbsp; if (!pToolBar || !pToolBar-&gt;LoadToolBar(IDR_MAINFRAME))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TRACE0("Failed to create toolbar\n");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return -1;<br>&nbsp;&nbsp;&nbsp; }<br></pre></td></tr></table><br>&nbsp;&nbsp;&nbsp; <br><u>4.</u>&nbsp; Build and run it.&nbsp; When you try to close the app, it will give you the error.<br><br>Please help.&nbsp; I need to find a fix for this fairly soon.&nbsp; Any help is appreciated.&nbsp; Thanks!&nbsp; <img src="http://forum.codejock.com/smileys/smiley23.gif" border="0"><br><br>]]>
   </description>
   <pubDate>Fri, 05 Aug 2005 15:25:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2690&amp;PID=8013&amp;title=a-derived-cxtptoolbar-and-customization#8013</guid>
  </item> 
 </channel>
</rss>