<?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 : Docking panes - no WM_WINDOWPOSCHANGING</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Docking Pane : Docking panes - no WM_WINDOWPOSCHANGING]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 09:43:21 +0000</pubDate>
  <lastBuildDate>Tue, 18 Oct 2005 11:42:05 +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=2379</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[Docking panes - no WM_WINDOWPOSCHANGING : Thanks for the feedback. As it...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=9111&amp;title=docking-panes-no-wm-windowposchanging#9111</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1542">jaredf</a><br /><strong>Subject:</strong> 2379<br /><strong>Posted:</strong> 18 October 2005 at 11:42am<br /><br />Thanks for the feedback.&nbsp; As it turns out in my scenario, the&nbsp;WinApp&nbsp;was already handling the OnIdle and&nbsp;pumping WM_IDLEUPDATECMDUI messages&nbsp;to descendants but not parents.&nbsp; Upgrading this&nbsp;forwarding to send to both principles and descendants eliminated the need to use the timer.]]>
   </description>
   <pubDate>Tue, 18 Oct 2005 11:42:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=9111&amp;title=docking-panes-no-wm-windowposchanging#9111</guid>
  </item> 
  <item>
   <title><![CDATA[Docking panes - no WM_WINDOWPOSCHANGING : I am not big fan of timer solution,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=9037&amp;title=docking-panes-no-wm-windowposchanging#9037</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1333">Stephen12</a><br /><strong>Subject:</strong> 2379<br /><strong>Posted:</strong> 13 October 2005 at 11:37am<br /><br /><P>I am not big fan of timer solution, but it&nbsp;was easier to paste some real code. Even&nbsp;better solution is to change your main windows message loop&nbsp;in trying to simulate MFC behaviour by kicking idle if there are no messages in your queue for certain&nbsp;time (or more precise there are no messages that&nbsp;are important&nbsp;updating your UI - search MFC code for<FONT color=#000000> </FONT><FONT color=#008000><FONT face="Times New Roman, Times, serif" color=#000000 size=2>AfxInternalIsIdleMessage()).</FONT></FONT>&nbsp;You would then&nbsp;call into your DLL based on CodeJock. There you&nbsp;just transfer call to your instance of CWinApp, in fact to its OnIdle() method. If you see how MFC loop is implemeted you will notice counters that provide&nbsp;facility for task separation&nbsp;, but you may not need to be so perfect to implement counter logic in your main windows message loop. It should be enough to pass parameter -1.</P><P>So, something like </P><P>CMyCodeJockBasedDllApp.OnIdle(-1)&nbsp;</P><P>in your MFC part shall do the magic.</P><P>&nbsp;</P><P>Main part will be to change your windows message loop so that instead of&nbsp;</P><P>while((bRet =GetMessage(...))!=0)<BR>{</P><P>&nbsp; ...&nbsp;&nbsp;</P><P>&nbsp; TranslateMessage(...);</P><P>&nbsp;&nbsp;DispatchMessage(...);</P><P>}</P><P>you&nbsp;&nbsp;PeekMessage(...) first, see if it is the one that is important for UI (see AfxInternalIsIdleMessage()) , if yes set some flag that you want to triger OnIdle and process the message, if no just&nbsp;process the message (GetMessage, Translate, Dispacth). If there are no messages in your queue see your flag and if it is&nbsp;set make call to your CodeJock based DLL and reset it. If not just wait for your next message.</P><P>The advantage of this solution is that it triggers idleupdatecmdui only when needed and there is nothing else to do, not when the timer ticks.</P><P>&nbsp;</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 13 Oct 2005 11:37:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=9037&amp;title=docking-panes-no-wm-windowposchanging#9037</guid>
  </item> 
  <item>
   <title><![CDATA[Docking panes - no WM_WINDOWPOSCHANGING : Great post, fixed my problem also!...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=9035&amp;title=docking-panes-no-wm-windowposchanging#9035</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1542">jaredf</a><br /><strong>Subject:</strong> 2379<br /><strong>Posted:</strong> 13 October 2005 at 10:21am<br /><br />Great post, fixed my problem also!]]>
   </description>
   <pubDate>Thu, 13 Oct 2005 10:21:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=9035&amp;title=docking-panes-no-wm-windowposchanging#9035</guid>
  </item> 
  <item>
   <title><![CDATA[Docking panes - no WM_WINDOWPOSCHANGING : As Oleg said you need to have...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=7886&amp;title=docking-panes-no-wm-windowposchanging#7886</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1333">Stephen12</a><br /><strong>Subject:</strong> 2379<br /><strong>Posted:</strong> 27 July 2005 at 11:24am<br /><br /><P><FONT face="Arial, Helvetica, sans-serif" size=2>As Oleg said you need to have WM_IDLEUPDATECMDUI send to your panes. Your main message loop doesn't have it, so you need to "fake" MFC framework behavior.&nbsp;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>One solution is to create timer in your CXTPFrameWnd that will send this message to all the panes. </FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>Good place for creating timer is in your CMyFrameWnd::OnCreate of the FrameWnd.</FONT></P><P><FONT face=Arial size=2></FONT>&nbsp;</P><P><FONT face="Arial, Helvetica, sans-serif" size=2>SetTimer(EVENT_IDLEUPDATE, 150, NULL); </FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2></FONT>&nbsp;</P><P><FONT face="Arial, Helvetica, sans-serif" size=2>Add handler for WM_TIMER</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2></FONT>&nbsp;</P><P><FONT face="Arial, Helvetica, sans-serif" size=2>CMyFrameWnd::OnTimer(UINT nIDEvent)</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>{</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>if(nIDEvent == EVENT_IDLEUPDATE &amp;&amp; m_hWnd)</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>{</FONT></P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P><FONT size=2><FONT face="Arial, Helvetica, sans-serif"><FONT color=#0000ff>if</FONT> (m_nShowDelay == SW_HIDE)</FONT></FONT></P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P><FONT face="Arial, Helvetica, sans-serif" size=2>ShowWindow(m_nShowDelay); </FONT></P></BLOCKQUOTE><P><FONT color=#008000><FONT face="Arial, Helvetica, sans-serif" size=2>// send WM_IDLEUPDATECMDUI to&nbsp;yourself and descendants - one of them is pane manager</FONT></P></FONT><P><FONT size=2><FONT face="Arial, Helvetica, sans-serif"><FONT color=#0000ff>if</FONT> (IsWindowVisible() || m_nShowDelay &gt;= 0) </FONT></FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>{ </FONT></P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P><FONT face="Arial, Helvetica, sans-serif" size=2>AfxCallWndProc(<FONT color=#0000ff>this</FONT>, m_hWnd,WM_IDLEUPDATECMDUI, (WPARAM)TRUE, 0); //send it to yourself</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>SendMessageToDescendants( WM_IDLEUPDATECMDUI,(WPARAM)TRUE, 0, TRUE, TRUE); //send it to your children, one of them is PaneManager</FONT></P></BLOCKQUOTE><P><FONT face="Arial, Helvetica, sans-serif" size=2>}</FONT></P><P><FONT color=#008000><FONT face="Arial, Helvetica, sans-serif" size=2>// send WM_IDLEUPDATECMDUI to the floating miniframewnd</FONT></P></FONT><P><FONT color=#008000><FONT face="Arial, Helvetica, sans-serif" size=2>// and its descendants</FONT></P></FONT><P><FONT color=#008000><FONT face="Arial, Helvetica, sans-serif" size=2>// walk through all top-level windows, these windows are owned by frame but they aren't its children - they are children of desktop instead. You need to update them too or your floating windows will be funny like your docked one is now</FONT></P></FONT><P><FONT face="Arial, Helvetica, sans-serif" size=2>HWND hWnd = ::GetWindow(::GetDesktopWindow(), GW_CHILD);</FONT></P><P><FONT size=2><FONT face="Arial, Helvetica, sans-serif"><FONT color=#0000ff>while</FONT> (hWnd != NULL)</FONT></FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>{</FONT></P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P><FONT face="Arial, Helvetica, sans-serif" size=2>CWnd* pWnd = CWnd::FromHandlePermanent(hWnd);</FONT></P><P><FONT size=2><FONT face="Arial, Helvetica, sans-serif"><FONT color=#0000ff>if</FONT> (pWnd != NULL &amp;&amp; m_hWnd != hWnd &amp;&amp; pWnd-&gt;GetOwner() == <FONT color=#0000ff>this</P></FONT></FONT></FONT><P><FONT face="Arial, Helvetica, sans-serif" size=2>&amp;&amp; pWnd-&gt;IsKindOf(RUNTIME_CLASS(CXTPDockingPaneMiniWnd)))</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>{</FONT></P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P><FONT face="Arial, Helvetica, sans-serif" size=2>AfxCallWndProc(pWnd, pWnd-&gt;m_hWnd, </FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>WM_IDLEUPDATECMDUI, (WPARAM)TRUE, 0);</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2></FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>pWnd-&gt;SendMessageToDescendants( WM_IDLEUPDATECMDUI,(WPARAM)TRUE, 0, TRUE, TRUE); </FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>}</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>hWnd = ::GetWindow(hWnd, GW_HWNDNEXT);</FONT></P></BLOCKQUOTE><P><FONT face="Arial, Helvetica, sans-serif" size=2>}</FONT></P></BLOCKQUOTE><P><FONT face="Arial, Helvetica, sans-serif" size=2>}</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2></FONT>&nbsp;</P><P><FONT size=2><FONT face="Arial, Helvetica, sans-serif"><FONT color=#0000ff>if</FONT> (m_nShowDelay &gt; SW_HIDE) </FONT></FONT></P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P><FONT face="Arial, Helvetica, sans-serif" size=2>ShowWindow(m_nShowDelay); </FONT></P></BLOCKQUOTE><P><FONT face="Arial, Helvetica, sans-serif" size=2>m_nShowDelay = -1;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>}</FONT></P><P><FONT face=Arial size=2>else</FONT></P><P><FONT face=Arial size=2>{</FONT></P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P><FONT face="Arial, Helvetica, sans-serif" color=#00cc33 size=2>//handle other events</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>CXTPFrameWnd::OnTimer(nIDEvent);</FONT></P></BLOCKQUOTE><P>}&nbsp;</P></BLOCKQUOTE><P><FONT face="Arial, Helvetica, sans-serif" size=2>}</FONT></P><P><FONT face=Arial size=2>I hope this will give you idea! Regards,</FONT></P><P><FONT face=Arial size=2>- Slobodan</FONT></P><P><FONT face=Arial size=2></FONT>&nbsp;</P>]]>
   </description>
   <pubDate>Wed, 27 Jul 2005 11:24:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=7886&amp;title=docking-panes-no-wm-windowposchanging#7886</guid>
  </item> 
  <item>
   <title><![CDATA[Docking panes - no WM_WINDOWPOSCHANGING : You must make all appliaction...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=7135&amp;title=docking-panes-no-wm-windowposchanging#7135</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2379<br /><strong>Posted:</strong> 17 June 2005 at 7:23am<br /><br />You must make all appliaction MFC based. DockingPanes need <FONT size=2><P>WM_IDLEUPDATECMDUI message to update its state.</P></FONT>]]>
   </description>
   <pubDate>Fri, 17 Jun 2005 07:23:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=7135&amp;title=docking-panes-no-wm-windowposchanging#7135</guid>
  </item> 
  <item>
   <title><![CDATA[Docking panes - no WM_WINDOWPOSCHANGING : One more thing: when redocking...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=7083&amp;title=docking-panes-no-wm-windowposchanging#7083</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1195">Matchay</a><br /><strong>Subject:</strong> 2379<br /><strong>Posted:</strong> 15 June 2005 at 7:06am<br /><br /><P>One more thing: when redocking the pane, for example from the left side to the top edge of the frame it disappears and the OnDockingPaneNotify message comes only when I move the toolbar. Then the pane reappears at the right position.</P><P>Maciej</P>]]>
   </description>
   <pubDate>Wed, 15 Jun 2005 07:06:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=7083&amp;title=docking-panes-no-wm-windowposchanging#7083</guid>
  </item> 
  <item>
   <title><![CDATA[Docking panes - no WM_WINDOWPOSCHANGING : Hello! I am struggling with integrating...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=7082&amp;title=docking-panes-no-wm-windowposchanging#7082</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1195">Matchay</a><br /><strong>Subject:</strong> 2379<br /><strong>Posted:</strong> 15 June 2005 at 6:28am<br /><br /><P>Hello!</P><P>I am struggling with integrating MFC/XTreme Toolkit Pro into an old application, where the main window was written in API (and there's no chance to rewrite it in MFC). </P><P>I managed to create an object of CXTPFrameWnd class and subclass the application window. It works fine then, I can create the Pane Manager and panes, attach windows to panes and so on, but I can't fight over a few problems with refreshing positions of panes and splitter gripper.</P><P>Look here, this is the initial state:</P><P><IMG src="uploads/Matchay/2005-06-15_061818_1.JPG" border="0"></P><P>then I click the "pin" to hide the pane, but it seems just to disappear:</P><P><IMG src="uploads/Matchay/2005-06-15_061929_2.JPG" border="0"></P><P>so I slightly move the Menu Bar around and only then the whole area gets updated:</P><P><IMG src="uploads/Matchay/2005-06-15_062048_3.JPG" border="0"></P><P>Generally in most of sizing/positioning actions the pane's position gets updated only when I explicitely move for example the Menu Bar. Sometimes you can see that the splitter gripper doesn't stick to the pane, sometimes it suddenly gets very wide, being the size of the whole window. </P><P>What I noticed when debugging with Spy++ is that e.g. on moving the gripper to resize the pane there's no WM_WINDOWPOSCHANGING message being sent around. I noticed that this message should be sent by the gripper , but it seems it's neither sent or receieved by the pane.</P><P>I guess it must be about message routing but I have no idea what should I fix.Any ideas would be really appreciated.</P><P>Regards!</P><P>Maciej</P>]]>
   </description>
   <pubDate>Wed, 15 Jun 2005 06:28:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2379&amp;PID=7082&amp;title=docking-panes-no-wm-windowposchanging#7082</guid>
  </item> 
 </channel>
</rss>