<?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 : resizable dialog &amp; problem with toolbar</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : resizable dialog &amp; problem with toolbar]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 20 Apr 2026 08:54:55 +0000</pubDate>
  <lastBuildDate>Fri, 03 Sep 2004 07:07:24 +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=484</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[resizable dialog &amp; problem with toolbar : You should use CXTCBarDialog,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=484&amp;PID=2953&amp;title=resizable-dialog-problem-with-toolbar#2953</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=365">Alex H.</a><br /><strong>Subject:</strong> 484<br /><strong>Posted:</strong> 03 September 2004 at 7:07am<br /><br /><P>You should use CXTCBarDialog, if working with the 4.1 or 4.0 Standard Edition.</P><P>This works much better :-)</P>]]>
   </description>
   <pubDate>Fri, 03 Sep 2004 07:07:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=484&amp;PID=2953&amp;title=resizable-dialog-problem-with-toolbar#2953</guid>
  </item> 
  <item>
   <title><![CDATA[resizable dialog &amp; problem with toolbar : I have a CXTResizeDialog app and...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=484&amp;PID=1204&amp;title=resizable-dialog-problem-with-toolbar#1204</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=390">Joe Brown</a><br /><strong>Subject:</strong> 484<br /><strong>Posted:</strong> 01 March 2004 at 10:52am<br /><br />I have a CXTResizeDialog app and added a toolbar to the top.  My dialog also has a few buttons and list controls.  When the app starts, everything looks fine, but as soon as I resize the dialog in any direction, all of the controls resize incorrectly.<br /><br />It almost seems as if they don't take into account the presence of the toolbar when recalculating new sizes and positions, because I've commented out my toolbar code and everything works fine.<br /><br />Here is my OnInitDialog function.  I took the toolbar creation and resizing code from one of the sample dialog apps and toolbar apps.<br /><br /><table width="99%"><tr><td><pre class="BBcode"><br />BOOL CVolEditDlg::OnInitDialog()<br />{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CXTResizeDialog::OnInitDialog( );<br /><br />// cut out a bunch of code that adds columns to my 2 list controls.<br /><br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CXTPPaintManager::SetTheme(xtp ThemeOfficeXP);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XTP_COMMANDBARS_ICONSINFO* pIconsInfo = XTPPaintManager()-&gt;GetIconsInfo();<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pIconsInfo-&gt;bUseDisabledIco ns = TRUE;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pIconsInfo-&gt;bIconsWithShado w = FALSE;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pIconsInfo-&gt;bUseFadedIcons = TRUE;<br /><br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VERIFY(m_toolbar.CreateToolBar (WS_VISIBLE|WS_CHILD|CBRS_TOOLTIPS|CBRS_GRIPPER,  this, AFX_IDW_TOOLBAR));<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VERIFY(m_toolbar.LoadToolBar(I DR_TOOLBAR));<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_toolbar.SetFlags(xtpFlagStre tched);<br /><br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((CXTPControlButton*)m_toolbar .GetControls()-&gt;FindControl(xtpControlButton,  ID_FILE_OPEN, TRUE, FALSE))-&gt;SetStyle(xtpButtonIconAndCaption);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((CXTPControlButton*)m_toolbar .GetControls()-&gt;FindControl(xtpControlButton,  ID_FILE_SAVE, TRUE, FALSE))-&gt;SetStyle(xtpButtonIconAndCaption);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((CXTPControlButton*)m_toolbar .GetControls()-&gt;FindControl(xtpControlButton,  ID_CLEAR, TRUE, FALSE))-&gt;SetStyle(xtpButtonIconAndCaption);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CRect rcClientStart;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CRect rcClientNow;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetClientRect(rcClientStart);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RepositionBars(AFX_IDW_CONTROL BAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0, reposQuery, rcClientNow);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CPoint ptOffset(rcClientStart.left - rcClientNow.left, -rcClientStart.top + rcClientNow.top);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ptOffset.y -= ::GetSystemMetrics(SM_CYMENU);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CRect rcChild;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CWnd* pwndChild = GetWindow(GW_CHILD);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while (pwndChild)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwndChild-&gt;GetWindowRect(rcChild); <br /> //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;rcChild.OffsetRect(ptOffset); <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwndChild-&gt;MoveWindow(rcChild,  FALSE);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwndChild = pwndChild-&gt;GetNextWindow();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CRect rcWindow;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetWindowRect(rcWindow);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rcWindow.right += rcClientStart.Width() - rcClientNow.Width();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rcWindow.bottom += rcClientStart.Height() - rcClientNow.Height();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MoveWindow(rcWindow, FALSE);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RepositionBars(AFX_IDW_CONTROL BAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// END create toolbar and reposition controls so toolbar is at the top<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Set control resizing.<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetResize(IDC_TXT_PWR_SUPPLIES , SZ_TOP_LEFT, SZ_TOP_RIGHT);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetResize(IDC_PWR_SUPPLIES, SZ_TOP_LEFT, SZ_TOP_RIGHT);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetResize(IDC_TXT_PWR_SEQ, SZ_TOP_LEFT, SZ_TOP_RIGHT);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetResize(IDC_PWR_SEQ_LIST, SZ_TOP_LEFT, SZ_BOTTOM_RIGHT);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetResize(IDC_ADD_POWER_SEQ_BU TTON, SZ_BOTTOM_RIGHT, SZ_BOTTOM_RIGHT);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetResize(IDC_DELETE_POWER_SEQ _BUTTON, SZ_BOTTOM_RIGHT, SZ_BOTTOM_RIGHT);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetResize(IDC_UP_POWER_SEQ, SZ_BOTTOM_RIGHT, SZ_BOTTOM_RIGHT);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetResize(IDC_DOWN_POWER_SEQ, SZ_BOTTOM_RIGHT, SZ_BOTTOM_RIGHT);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Load window placement<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LoadPlacement(_T("CVolEditDlg" ));<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetMinSize(CSize(rcWindow.Widt h(), rcWindow.Height()));<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AdjustListCtrlLastColumnWidth( );<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return TRUE;  // return TRUE  unless you set the focus to a control<br />}<br /></pre></td></tr></table>]]>
   </description>
   <pubDate>Mon, 01 Mar 2004 10:52:08 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=484&amp;PID=1204&amp;title=resizable-dialog-problem-with-toolbar#1204</guid>
  </item> 
 </channel>
</rss>