<?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 : CWnd drawing background problem</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : General Discussion : CWnd drawing background problem]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 04:30:31 +0000</pubDate>
  <lastBuildDate>Tue, 24 Apr 2007 13:23:08 +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=6963</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[CWnd drawing background problem : I already done this.  Thanks...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6963&amp;PID=22262&amp;title=cwnd-drawing-background-problem#22262</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1940">BastianPL</a><br /><strong>Subject:</strong> 6963<br /><strong>Posted:</strong> 24 April 2007 at 1:23pm<br /><br />I already done this.<DIV>&nbsp;</DIV><DIV>Thanks</DIV>]]>
   </description>
   <pubDate>Tue, 24 Apr 2007 13:23:08 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6963&amp;PID=22262&amp;title=cwnd-drawing-background-problem#22262</guid>
  </item> 
  <item>
   <title><![CDATA[CWnd drawing background problem : Hi, Override this CWnd and fill...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6963&amp;PID=22246&amp;title=cwnd-drawing-background-problem#22246</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6963<br /><strong>Posted:</strong> 24 April 2007 at 7:24am<br /><br /><DIV>Hi,</DIV><DIV>Override this CWnd and fill background in its WM_PAINT handler.</DIV>]]>
   </description>
   <pubDate>Tue, 24 Apr 2007 07:24:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6963&amp;PID=22246&amp;title=cwnd-drawing-background-problem#22246</guid>
  </item> 
  <item>
   <title><![CDATA[CWnd drawing background problem : Hi,I am creating a CWnd object...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6963&amp;PID=22236&amp;title=cwnd-drawing-background-problem#22236</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1940">BastianPL</a><br /><strong>Subject:</strong> 6963<br /><strong>Posted:</strong> 24 April 2007 at 6:12am<br /><br />Hi,<BR><BR>I am creating a CWnd object in CView class. I would like to change a<BR>background colour of created window but my code doesn't work. Do you<BR>have any ideas how to resolve my problem:<BR><BR>My code is:<BR><BR><FONT size=1>CWnd *pWnd = &amp;m_wndClient;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;UINT nClassStyle = CS_CLASSDC | CS_SAVEBITS | CS_HREDRAW |<BR>CS_VREDRAW;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;BOOL bDropShadow;<BR>&nbsp;&nbsp;&nbsp;&nbsp;::SystemParametersInfo( SPI_GETDROPSHADOW, 0, &amp;bDropShadow, FALSE );<BR>&nbsp;&nbsp;&nbsp;&nbsp;if ( bDropShadow )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nClassStyle |= CS_DROPSHADOW;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;CString szClassName = AfxRegisterWndClass( nClassStyle, 0, NULL, 0 );<BR>&nbsp;&nbsp;&nbsp;&nbsp;pWnd-&gt;CreateEx( 0, szClassName, "", WS_VISIBLE | WS_CHILD |<BR>WS_BORDER, 200, 200, 400, 400, this-&gt;GetSafeHwnd(), 0, NULL );<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;CDC *pDC = pWnd-&gt;GetDC();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;CBrush Brush;<BR>&nbsp;&nbsp;&nbsp;&nbsp;Brush.CreateStockObject( WHITE_BRUSH );<BR>&nbsp;&nbsp;&nbsp;&nbsp;CRect r( 200, 200, 400, 400 );<BR>&nbsp;&nbsp;&nbsp;&nbsp;CBrush *pOldBrush = pDC-&gt;SelectObject( &amp;Brush );<BR>&nbsp;&nbsp;&nbsp;&nbsp;pDC-&gt;Rectangle( r );<BR>&nbsp;&nbsp;&nbsp;&nbsp;pDC-&gt;FillRect( &amp;r, &amp;Brush);<BR>&nbsp;&nbsp;&nbsp;&nbsp;pWnd-&gt;Invalidate();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;pDC-&gt;SelectObject( pOldBrush );<BR>&nbsp;&nbsp;&nbsp;&nbsp;Brush.DeleteObject();<BR></FONT>]]>
   </description>
   <pubDate>Tue, 24 Apr 2007 06:12:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6963&amp;PID=22236&amp;title=cwnd-drawing-background-problem#22236</guid>
  </item> 
 </channel>
</rss>