<?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 : MDI flicking&#146;s problem</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : MDI flicking&#146;s problem]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 20 Apr 2026 18:32:41 +0000</pubDate>
  <lastBuildDate>Wed, 26 Jan 2005 22:43:45 +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=1707</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[MDI flicking&#146;s problem : Why one flicking and the other...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1707&amp;PID=4853&amp;title=mdi-flickings-problem#4853</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=272">zhou_wz</a><br /><strong>Subject:</strong> 1707<br /><strong>Posted:</strong> 26 January 2005 at 10:43pm<br /><br /><P>Why one flicking and the other non-flicking?<BR>The flicker happens when you use this code to attach MDIClientWnd<BR>m_MTIClientWnd.Attach(this);// disable group<BR>and when ChildFrame is maximnum, and activated by Left Button Click on the tab to switch the tab, you can see the caption frame appears and disappears<BR>In the samples of XTP, there are two different methods to solve the mdichild caption's flicking in MDI app.</P><P>method 1.Overload WindowProc to deal WM_NCPAINT, such as in demo: CommandBarsDesigner</P><P>LRESULT CChildFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) <BR>{<BR>&nbsp;if (message == WM_NCPAINT)<BR>&nbsp;{<BR>&nbsp;&nbsp;// prevent caption blinking<BR>&nbsp;&nbsp;return TRUE;<BR>&nbsp;}<BR>&nbsp;<BR>&nbsp;return CMDIChildWnd::WindowProc(message, wParam, lParam);<BR>}</P><P>method 2.Modify&nbsp; mdichild initial size in PreCreateWindow, such as in demo: DrawCli</P><P>BOOL CSplitFrame::PreCreateWindow(CREATESTRUCT&amp; cs)<BR>{<BR>&nbsp;// make sure view is maximum size to eliminate <BR>&nbsp;// flicker when switching tabs.<BR>&nbsp;cs.x = <BR>&nbsp;cs.y = 0;<BR>&nbsp;<BR>&nbsp;cs.cx = <BR>&nbsp;cs.cy = 32767;<BR>&nbsp;<BR>&nbsp;// TODO: Modify the Window class or styles here by modifying<BR>&nbsp;//&nbsp; the CREATESTRUCT cs</P><P>&nbsp;if( !CMDIChildWnd::PreCreateWindow(cs) )<BR>&nbsp;&nbsp;return FALSE;<BR>&nbsp;<BR>&nbsp;return TRUE;<BR>}</P><P><BR>It seems that the two methods work well in each application<BR>But I try to use method 1 in DrawCli instead of meathod 2, the DrawCli still flicks.<BR>I check the MainFrm, ChildFrm, even Views. <BR>There is no code can solve the flicker.<BR>Why this happens when transplant method 1 to method 2?</P>]]>
   </description>
   <pubDate>Wed, 26 Jan 2005 22:43:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1707&amp;PID=4853&amp;title=mdi-flickings-problem#4853</guid>
  </item> 
 </channel>
</rss>