<?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 : Converting CDialogBar to CXTPDialogBar?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : Converting CDialogBar to CXTPDialogBar?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 25 May 2026 15:34:20 +0000</pubDate>
  <lastBuildDate>Sat, 04 Feb 2012 20:35: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=19466</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[Converting CDialogBar to CXTPDialogBar? :   Hi guys, struggling here trying...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19466&amp;PID=67553&amp;title=converting-cdialogbar-to-cxtpdialogbar#67553</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7312">cuisinart</a><br /><strong>Subject:</strong> 19466<br /><strong>Posted:</strong> 04 February 2012 at 8:35pm<br /><br />Hi guys, struggling here trying to test out this skinning framework by converting my app to use it.<br>&nbsp; The User Guide is severely lacking.<br><br>&nbsp;I make use of CDialogBars, and the constructor:<br><b>CDialogBar::Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID)</b><br><br>These of course are not skinned, but the skin framework offers a skinnable CXTPDialogBar. Drop-in replacement, right?&nbsp; Nope.<br><br>Unfortunately there is no similar constructor in CXTPDialogBar, and I'm at a loss as to how to convert between the two.<br><br>There are two ways to construct CXTPDialogBar. One is without any template, which doesn't make much sense, and another requires use of a string class name.&nbsp; There is no constructor that allows use of a nIDTemplate integer. &nbsp;<br><br>So, I used the User's guide search feature to search for CXTPDialogBar, but the word does not exist.<br><br>So, how can I use CXTPDialogBar with a dialog resource ID template?<br><br><br>EDIT:<br>Ok, after a while it's coming together.&nbsp; Despite the user guide, there are a lot of good examples where most of this can be learned, by searching through the source for the functions to learn.<br><br>Instead of the MFC method of creating the CToolBar member in the OnCreate function of CMainFrame using CToolBar::Create (or CDialogBar::Create), we aren't supposed to create CXTPToolbars and dialog bars via their create functions. A toolbar should be created by adding it first to the commandBar, and then LOADING the gui-generated toolbar template as so:<br><br>CXTPToolBar* pToolBar = (CXTPToolBar*)&nbsp; pCommandBars-&gt;Add(_T("Main"), xtpBarTop);<br>pToolBar-&gt;LoadToolBar(IDR_MAINFRAME);<br><br>Likewise, dialog-based command bars are not to be create() ed with a template, rather they are to be added to the command bar, sized, and then a child dialog or wnd is attached with SetChild:<br><br>CXTPDialogBar* pPalBar = (CXTPDialogBar*) pCommandBars-&gt;Add(_T("Palette"), xtpBarRight,RUNTIME_CLASS(CXTPDialogBar));<br>m_wndColorPalette.Create(0,0,WS_VISIBLE | WS_CHILD,CRect(),pPalBar,0);<br>pPalBar-&gt;SetChild(&amp;m_wndColorPalette);<br><br>By setting the DialogBar to be aware of its child, it will update the child dialog or window size during scaling and docking transitions.<br>]]>
   </description>
   <pubDate>Sat, 04 Feb 2012 20:35:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19466&amp;PID=67553&amp;title=converting-cdialogbar-to-cxtpdialogbar#67553</guid>
  </item> 
 </channel>
</rss>