<?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 : Funny behaviour inside dialogs</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Funny behaviour inside dialogs]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 09:07:08 +0000</pubDate>
  <lastBuildDate>Tue, 09 Nov 2004 02:16:32 +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=1382</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[Funny behaviour inside dialogs : If you don&amp;#039;t want to change...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1382&amp;PID=3919&amp;title=funny-behaviour-inside-dialogs#3919</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 1382<br /><strong>Posted:</strong> 09 November 2004 at 2:16am<br /><br /><P>If you don't want to change source code, you can override CXTPToolBar and its OnLButtonDown method:</P><P>void CToolBar::OnLButtonDown(UINT nFlags, CPoint point)<BR>{</P><P>&nbsp;&nbsp;&nbsp; if (m_barPosition != xtpBarFloating)</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return CXTPCommandBar::OnLButtonDown(nFlags, point);</P><P>&nbsp; return CXTPToolBar::OnLButtonDown(nFlags, point);</P><P>}<BR></P>]]>
   </description>
   <pubDate>Tue, 09 Nov 2004 02:16:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1382&amp;PID=3919&amp;title=funny-behaviour-inside-dialogs#3919</guid>
  </item> 
  <item>
   <title><![CDATA[Funny behaviour inside dialogs : Thanks Oleg! My product ships...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1382&amp;PID=3918&amp;title=funny-behaviour-inside-dialogs#3918</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=807">Uwe Keim</a><br /><strong>Subject:</strong> 1382<br /><strong>Posted:</strong> 08 November 2004 at 11:17pm<br /><br /><P>Thanks Oleg! My product ships in February 2005. So I will wait and if there is no next version I will recompile the sources as you mentioned.</P><P>Thanks<BR>Uwe</P>]]>
   </description>
   <pubDate>Mon, 08 Nov 2004 23:17:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1382&amp;PID=3918&amp;title=funny-behaviour-inside-dialogs#3918</guid>
  </item> 
  <item>
   <title><![CDATA[Funny behaviour inside dialogs : in void CXTPToolBar::OnLButtonDown(UINT...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1382&amp;PID=3906&amp;title=funny-behaviour-inside-dialogs#3906</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 1382<br /><strong>Posted:</strong> 08 November 2004 at 12:16pm<br /><br /><P>in void CXTPToolBar::OnLButtonDown(UINT nFlags, CPoint point) of source code</P><P>replace</P><P>SetWindowPos(&amp;CWnd::wndTop, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);</P><P>to </P><P>&nbsp;if (m_barPosition == xtpBarFloating)<BR>&nbsp;&nbsp;SetWindowPos(&amp;CWnd::wndTop, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);</P><P>&nbsp;</P><P>in next version we will fix it too.</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Mon, 08 Nov 2004 12:16:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1382&amp;PID=3906&amp;title=funny-behaviour-inside-dialogs#3906</guid>
  </item> 
  <item>
   <title><![CDATA[Funny behaviour inside dialogs : I have a dialog box (derived from...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1382&amp;PID=3888&amp;title=funny-behaviour-inside-dialogs#3888</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=807">Uwe Keim</a><br /><strong>Subject:</strong> 1382<br /><strong>Posted:</strong> 08 November 2004 at 1:03am<br /><br /><P>I have a dialog box (derived from <FONT face="Courier New, Courier, mono" color=#660000>CXTPDialogBase</FONT>) that is resizable (I don't use the XT sizable dialogs but&nbsp;this class:&nbsp;<A href="http://www.codetools.com/dialog/dynwindow.asp" target="_blank">http://www.codetools.com/dialog/dynwindow.asp</A>, because I just switched to XT and used the other class already since 2 years).</P><P>Now I added a menu bar (<FONT face="Courier New, Courier, mono" color=#660000>CXTPMenuBar</FONT>), a tool bar (<FONT face="Courier New, Courier, mono" color=#660000>CXTPToolBar</FONT>) and a status bar (<FONT face="Courier New, Courier, mono" color=#660000>CXTPStatusBar</FONT>) to the dialog. The dialog then looks like this:</P><P><IMG src="http://magerquark.de/data/misc/codejock-dialog-01.JPG" border="0"></P><P>Now I have a strange behaviour, in that every time the user clicks a tool bar button&nbsp;or a menu bar&nbsp;button and then the dialog is resized by the user, the last-clicked bar (menu bar or tool bar) is put on top of the other. Let me explain:</P><P>1.) The user clicks a tool bar button:</P><P><IMG src="http://magerquark.de/data/misc/codejock-dialog-02.JPG" border="0"></P><P>2.) Then the user resizes the dialog. Now the tool bar moves up:</P><P><IMG src="http://magerquark.de/data/misc/codejock-dialog-03.JPG" border="0"></P><P>3.) The user now clicks a menu bar item:</P><P><IMG src="http://magerquark.de/data/misc/codejock-dialog-04.JPG" border="0"></P><P>4.) And then resizes the dialog again. Now the menu bar jumps up again to the correct position:</P><P><IMG src="http://magerquark.de/data/misc/codejock-dialog-05.JPG" border="0"></P><P><strong>Question: </strong>Can you please tell me how I can tell that bars to keep their positions?</P><P>More informationen: Whenever a <FONT face="Courier New, Courier, mono" color=#660000>WM_SIZE</FONT> event occurs, I do the following code on the bars to keep them fill up the whole dialog width:</P><P><FONT face="Courier New, Courier, mono" color=#660000>RepositionBars(<BR>&nbsp;&nbsp;&nbsp; AFX_IDW_CONTROLBAR_FIRST, <BR>&nbsp;&nbsp;&nbsp; AFX_IDW_CONTROLBAR_LAST, <BR>&nbsp;&nbsp;&nbsp; 0 ); </FONT></P><P><FONT face="Courier New, Courier, mono" color=#660000>ToolBar.InvalidateParents();</FONT></P><P><FONT face="Verdana, Arial, Helvetica, sans-serif" color=#000000>Thank you for enlightening me <IMG src="http://forum.codejock.com/smileys/smiley1.gif" border="0">.<BR><EM>Uwe</EM></FONT></P>]]>
   </description>
   <pubDate>Mon, 08 Nov 2004 01:03:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1382&amp;PID=3888&amp;title=funny-behaviour-inside-dialogs#3888</guid>
  </item> 
 </channel>
</rss>