<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>鸡啄米-VS2010/MFC编程入门之五十一（图形图像：GDI对象之画刷CBrush）</title><link>http://www.jizhuomi.com/software/248.html</link><generator>RainbowSoft Studio Z-Blog 1.8 Walle Build 100427</generator><language>zh-CN</language><pubDate>Fri, 12 Oct 2012 22:19:02 +0800</pubDate><item><title>Re:VS2010/MFC编程入门之五十一（图形图像：GDI对象之画刷CBrush）</title><author> (在)</author><link>http://www.jizhuomi.com/software/248.html#cmt11934</link><pubDate>Fri, 29 Jul 2016 21:09:59 +0800</pubDate><guid>http://www.jizhuomi.com/software/248.html#cmt11934</guid><description><![CDATA[有一天在查资料的时候无意间见到了这个博客，在里面我发现了很多有用的的东西，VS2010/MFC编程入门我全部看了并照着练习了一篇，以前自学的时候没有一点头绪，楼主写的这个教程简短易懂，给了我很大帮助，感谢楼主的无私奉献，特意给楼主留言表达我的感激之情，祝生活愉快！]]></description></item><item><title>Re:VS2010/MFC编程入门之五十一（图形图像：GDI对象之画刷CBrush）</title><author> (snake)</author><link>http://www.jizhuomi.com/software/248.html#cmt4008</link><pubDate>Thu, 04 Sep 2014 21:39:55 +0800</pubDate><guid>http://www.jizhuomi.com/software/248.html#cmt4008</guid><description><![CDATA[我觉得学GDI还不如学GDI+，GDI+才符合MFC对象编程。袁芳，你怎么看？<br/>楼主有空给我们出一套GDI+的教程吗？]]></description></item><item><title>Re:VS2010/MFC编程入门之五十一（图形图像：GDI对象之画刷CBrush）</title><author> (编程爱好者)</author><link>http://www.jizhuomi.com/software/248.html#cmt2160</link><pubDate>Mon, 05 Nov 2012 19:47:11 +0800</pubDate><guid>http://www.jizhuomi.com/software/248.html#cmt2160</guid><description><![CDATA[您好，我想请教一个问题：我在对话框上放了一个图片控件，在上面画图，现在想通过点击某一按钮之后，清除图片控件上的内容。我想的是用背景色将rect区域覆盖一次，但是运行后没报错，点击按钮却无反应？：<br/> <br/>void CScopeTestDlg::OnButton2() <br/> {    <br/>     RECT rect1;<br/>     GetDlgItem(IDC_PIC1)-&gt;GetWindowRect(&amp;rect1);   //IDC_PIC1是控件ID<br/>     CDC *pDC1=NULL;<br/>     pDC1=(CDC *)GetDlgItem(IDC_PIC1);<br/>     pDC1-&gt;FillSolidRect(&amp;rect1,GetBkColor((HDC )pDC1));<br/> <br/>Invalidate(TRUE)试过了也没用啊. 不知道应该怎么改呢？<blockquote><div class="quote quote3"><div class="quote-title">秦风 于 2013-01-16 10:37:59 回复</div>//定义一个全局颜色变量<br/>COLORREF v_colorAll;<br/>//在设置颜色的响应事件里获取背景色，保存<br/>v_colorAll=dc.GetBkColor();//全局变量获取picture控件的原始背景色保存<br/>//在响应清除背景色的函数里：<br/>void CTextOutPractise::OnBnClickedBtnCleancolor()<br/>{<br/>	CClientDC dc(this);<br/>	CRect rectPicture;<br/>	m_pictureColor.GetWindowRect(&amp;rectPicture);   <br/>        ScreenToClient(&amp;rectPicture);  <br/>	CBrush brush1(v_colorAll);<br/>	dc.FillRect(rectPicture,&amp;brush1);<br/>	// TODO: 在此添加控件通知处理程序代码<br/>}<br/><br/>但是我这样清除颜色之后，背景色成为白色，并不是灰色的背景色。求教！</div></blockquote><blockquote><div class="quote quote3"><div class="quote-title">wegen 于 2015-8-20 15:15:24 回复</div>秦风的方法的问题在于v_colorAll=dc.GetBkColor()，CDC::GetBkColor()这个函数返回的是当前的背景颜色，但是在颜色的相应事件中并没有对背景进行改动，应该改为v_colorALL=colorDLg.Getcolor().</div></blockquote>]]></description></item><item><title>Re:VS2010/MFC编程入门之五十一（图形图像：GDI对象之画刷CBrush）</title><author> (亚洲米)</author><link>http://www.jizhuomi.com/software/248.html#cmt2087</link><pubDate>Tue, 16 Oct 2012 22:10:47 +0800</pubDate><guid>http://www.jizhuomi.com/software/248.html#cmt2087</guid><description><![CDATA[可不可以更新快点啊！！嘿嘿，博主讲的最好懂了！<blockquote><div class="quote quote3"><div class="quote-title">鸡啄米 于 2012-10-18 22:46:45 回复</div>谢谢，我会尽量快点的</div></blockquote>]]></description></item><item><title>Re:VS2010/MFC编程入门之五十一（图形图像：GDI对象之画刷CBrush）</title><author>798033046@qq.com (港城婚纱摄影)</author><link>http://www.jizhuomi.com/software/248.html#cmt2067</link><pubDate>Sat, 13 Oct 2012 10:32:42 +0800</pubDate><guid>http://www.jizhuomi.com/software/248.html#cmt2067</guid><description><![CDATA[支持一下]]></description></item></channel></rss>
