<?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 : CNoFlickerWnd error</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CNoFlickerWnd error]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 03 Apr 2026 20:13:07 +0000</pubDate>
  <lastBuildDate>Thu, 27 Sep 2007 14:15:13 +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=8199</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[CNoFlickerWnd error : ok, thanks ! ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8199&amp;PID=26538&amp;title=cnoflickerwnd-error#26538</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3171">evoX</a><br /><strong>Subject:</strong> 8199<br /><strong>Posted:</strong> 27 September 2007 at 2:15pm<br /><br />ok, thanks !]]>
   </description>
   <pubDate>Thu, 27 Sep 2007 14:15:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8199&amp;PID=26538&amp;title=cnoflickerwnd-error#26538</guid>
  </item> 
  <item>
   <title><![CDATA[CNoFlickerWnd error : Hi,   This template was not...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8199&amp;PID=26537&amp;title=cnoflickerwnd-error#26537</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1">kstowell</a><br /><strong>Subject:</strong> 8199<br /><strong>Posted:</strong> 27 September 2007 at 2:04pm<br /><br />Hi, <DIV>&nbsp;</DIV><DIV>This template was not intended to be used as a base class, a&nbsp;correct implementation would be:</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"><FONT color=#0000ff>public</FONT>:<BR>&nbsp;&nbsp;&nbsp; CNoFlickerWnd&lt;CSomeWnd&gt;&nbsp; m_wndSomeVar;</pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>If you want to use this as a base class you could probably do it with some minor modifications by adding a constructor, however for what it is worth, it might be just as easy to add "<FONT size=2><FONT color=#0000ff>virtual</FONT> LRESULT WindowProc(UINT message,WPARAM wParam,LPARAM lParam)</FONT>" to your form view derived class and cut-n-paste the code from the template class, for example:</DIV><DIV>&nbsp;</DIV><DIV>MyView.h:</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>protected:<BR>&nbsp;&nbsp;&nbsp; virtual LRESULT CMyView::WindowProc(UINT message,WPARAM wParam,LPARAM lParam);</pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>MyView.cpp:</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>LRESULT CMyView::WindowProc(UINT message,WPARAM wParam,LPARAM lParam)<BR>{<BR>&nbsp;&nbsp;&nbsp; switch (message)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case WM_PAINT:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CPaintDC dc(this);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Get the client rect, and paint to a memory device context.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // This will help reduce screen flicker. Pass the memory<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // device context to the default window procedure to do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // default painting.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPClientRect rc(this);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPBufferDC memDC(dc, rc);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memDC.FillSolidRect(rc, GetXtremeColor(COLOR_WINDOW));<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return CFormView::DefWindowProc(WM_PAINT,(WPARAM)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memDC.m_hDC, 0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case WM_ERASEBKGND:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return TRUE;<BR>&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;&nbsp;&nbsp; return CFormView::WindowProc(message, wParam, lParam);<BR>}</pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>Cheers,</DIV>]]>
   </description>
   <pubDate>Thu, 27 Sep 2007 14:04:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8199&amp;PID=26537&amp;title=cnoflickerwnd-error#26537</guid>
  </item> 
  <item>
   <title><![CDATA[CNoFlickerWnd error : I have this CNoFlickerWnd class...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8199&amp;PID=26535&amp;title=cnoflickerwnd-error#26535</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3171">evoX</a><br /><strong>Subject:</strong> 8199<br /><strong>Posted:</strong> 27 September 2007 at 1:09pm<br /><br />I have this CNoFlickerWnd class<FONT color=#0000ff size=2> <P>emplate</FONT><FONT size=2>&lt;</FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> BASE_CLASS&gt;</P></FONT><FONT color=#0000ff size=2><P>class</FONT><FONT size=2> CNoFlickerWnd : </FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> BASE_CLASS</P><P>{</P><P></P></FONT><FONT color=#0000ff size=2><P>protected</FONT><FONT size=2>:</P><P></FONT><FONT color=#0000ff size=2>virtual</FONT><FONT size=2> LRESULT WindowProc(UINT message,WPARAM wParam,LPARAM lParam)</P><P>{</P><P></FONT><FONT color=#0000ff size=2>switch</FONT><FONT size=2> (message)</P><P>{</P><P></FONT><FONT color=#0000ff size=2>case</FONT><FONT size=2> WM_PAINT:</P><P>{</P><P>CPaintDC dc(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>);</P><P></FONT><FONT color=#008000 size=2>// Get the client rect, and paint to a memory device context.</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>// This will help reduce screen flicker. Pass the memory</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>// device context to the default window procedure to do</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>// default painting.</P></FONT><FONT size=2><P>CXTPClientRect rc(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>);</P><P>CXTPBufferDC memDC(dc, rc);</P><P>memDC.FillSolidRect(rc, GetXtremeColor(COLOR_WINDOW));</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> BASE_CLASS::DefWindowProc(WM_PAINT,</P><P>(WPARAM)memDC.m_hDC, 0);</P><P>}</P><P></FONT><FONT color=#0000ff size=2>case</FONT><FONT size=2> WM_ERASEBKGND:</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> TRUE;</P><P>}</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> BASE_CLASS::WindowProc(message, wParam, lParam);</P><P>}</P><P>};</P><DIV></DIV><P>&nbsp;</P><DIV></DIV>and I have my class defined like this: <DIV></DIV><FONT color=#0000ff size=2><P>class</FONT><FONT size=2> CMyView : </FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> CNoFlickerWnd&lt;CFormView&gt;</P><DIV></DIV><DIV></DIV><DIV></DIV>Why I get this error? <DIV>Error&nbsp;202&nbsp;error C2512: 'CNoFlickerWnd&lt;BASE_CLASS&gt;' : no appropriate default constructor available&nbsp;d:\vs\projects\test\testview.cpp&nbsp;118&nbsp;<BR>Error&nbsp;203&nbsp;error C2614: 'CMyView' : illegal member initialization: 'CFormView' is not a base or member&nbsp;d:\vs\projects\test\testview.cpp&nbsp;118&nbsp;<BR></DIV></FONT></FONT>]]>
   </description>
   <pubDate>Thu, 27 Sep 2007 13:09:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8199&amp;PID=26535&amp;title=cnoflickerwnd-error#26535</guid>
  </item> 
 </channel>
</rss>