<?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 : Codejock alternative to CDialogBar</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Codejock alternative to CDialogBar]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 14 Apr 2026 07:19:52 +0000</pubDate>
  <lastBuildDate>Fri, 10 Sep 2010 11:00:06 +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=16573</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[Codejock alternative to CDialogBar : I had the exact same problem and...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16573&amp;PID=60130&amp;title=codejock-alternative-to-cdialogbar#60130</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5842">Hieracosphinx</a><br /><strong>Subject:</strong> 16573<br /><strong>Posted:</strong> 10 September 2010 at 11:00am<br /><br />I had the exact same problem and have just solved it.&nbsp; The solution that works for me is to restore the template size to the CXTPDialogBar after loading the command bars from registry or serialized storage.<br><br>My structure to support this:<br><br>1. derive CMyDlgBar from MFC CDialog.&nbsp; CDialogBar does not seem to work in all kinds of ways.&nbsp; (I am on VS 2002, MFC 7.)<br>You will need access to the template size so:<br><br>BOOL CMyDlgBar::OnInitDialog(CDataExchange* pDX)<br>{<br>&nbsp; .<br>&nbsp; .<br>&nbsp; CRect rc;<br>&nbsp; GetWindowRect(rc);<br>&nbsp; ScreenToClient(rc);<br>&nbsp; m_size = rc.Size();<br>&nbsp; .<br>&nbsp; .<br>}<br><br>CSize CMyDlgBar::GetSize()<br>{<br>&nbsp; return m_size:<br>}<br><br>2. Add a dockbar (CXTPDialogBar) to CommandBars, connecting my bar as child, then set the size.<br><br>void CMainFrame::CreateBar(int nID, LPCTSTR name, CMyDlgBar* pDlgBar, BOOL hideAtStart)<br>{<br>&nbsp;&nbsp;&nbsp; CXTPCommandBars* pCommandBars = GetCommandBars();<br>&nbsp;&nbsp;&nbsp; CXTPDialogBar* pBar = (CXTPDialogBar*)pCommandBars-&gt;Add(name,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; xtpBarTop, RUNTIME_CLASS(CXTPDialogBar));<br>&nbsp;&nbsp;&nbsp; pBar-&gt;SetBarID(nID);<br>&nbsp;&nbsp;&nbsp; pBar-&gt;EnableDocking(xtpFlagAlignTop|xtpFlagAlignBottom|xtpFlagStretched);<br>&nbsp;&nbsp;&nbsp; pBar-&gt;ModifyStyle(0, WS_CLIPCHILDREN|WS_CLIPSIBLINGS);<br>&nbsp;&nbsp;&nbsp; pBar-&gt;SetCloseable(FALSE);<br>&nbsp;&nbsp;&nbsp; pBar-&gt;SetResizable(FALSE);<br>&nbsp;&nbsp;&nbsp; pDlgBar-&gt;Create(pBar);<br>&nbsp;&nbsp;&nbsp; pDlgBar-&gt;ShowWindow(SW_SHOW);<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; pBar-&gt;SetChild(pDlgBar);<br>&nbsp;&nbsp;&nbsp; pBar-&gt;SetSize(pDlgBar-&gt;GetSize());&nbsp;&nbsp;// Note, this only changes the <i>height</i> of a docked bar.<br><br>&nbsp;&nbsp;&nbsp; pBar-&gt;SetVisible( ! hideAtStart);<br>}<br><br>3. Each time you load the command bars from storage, the dock size may be old so you will need<br>something to reset it after loading:&nbsp; (I have a workspace library for users to create their own layouts.)<br>&nbsp;<br>void CMainFrame::SetSizeDlgBarDockToTemplate(int nDockID, CMyDlgBar* pDlgBar)<br>{<br>&nbsp;&nbsp;&nbsp; CXTPCommandBars* pCommandBars = GetCommandBars();<br>&nbsp;&nbsp;&nbsp; CXTPDialogBar* pBar = (CXTPDialogBar*)pCommandBars-&gt;GetToolBar(nDockID);<br>&nbsp;&nbsp;&nbsp; CSize sz = pDlgBar-&gt;GetSize();<br>&nbsp;&nbsp;&nbsp; pBar-&gt;SetSize(sz);<br>}<br><br>Hope this helps. <img src="http://forum.codejock.com/smileys/smiley1.gif" border="0" align="absmiddle"><br><br><br>]]>
   </description>
   <pubDate>Fri, 10 Sep 2010 11:00:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16573&amp;PID=60130&amp;title=codejock-alternative-to-cdialogbar#60130</guid>
  </item> 
  <item>
   <title><![CDATA[Codejock alternative to CDialogBar : My program uses a docked CDialogBar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16573&amp;PID=58032&amp;title=codejock-alternative-to-cdialogbar#58032</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5902">CyberSky</a><br /><strong>Subject:</strong> 16573<br /><strong>Posted:</strong> 11 April 2010 at 8:34pm<br /><br />My program uses a docked CDialogBar for a "control panel" along the left or right size of the window. I want to replace this with a nicer-looking Codejock alternative, such as a docking pane or CXTPDialogBar. My problem is that unlike the standard MFC CDialogBar, neither of the alternatives automatically size themselves to the dialog template.<DIV>&nbsp;</DIV><DIV>I checked the samples, and CommandBars.ActionsSample uses a CXTPDialogBar, and it looks okay when I first run the program, but if I resize the dialog and then rebuilt the program, the dialog bar's controls are cut off by the window's edge. I also tried using docking panes but have the same trouble. I know about the SetSize() method but can't seem to programmatically determine the size that I need to pass so that the entire dialog appears in the pane with even margins around it.</DIV><DIV>&nbsp;</DIV><DIV>If anybody has dealt with this and could give me some pointers, I'd be grateful. Maybe it's obvious, but I'm really frustrated right now and a bit worried. Using the Codejock product has been more work than I imagined, but so far I've eventually managed to make things work.</DIV><DIV>&nbsp;</DIV><DIV>Am using VS2008 on Windows 7 64-bit, Xtreme Toolkit Pro 13.3.1.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 11 Apr 2010 20:34:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16573&amp;PID=58032&amp;title=codejock-alternative-to-cdialogbar#58032</guid>
  </item> 
 </channel>
</rss>