<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: how to set color for static control text in dialog?</title>
	<atom:link href="http://weseetips.com/2008/08/27/how-to-set-color-for-static-control-text-in-dialog/feed/" rel="self" type="application/rss+xml" />
	<link>http://weseetips.com/2008/08/27/how-to-set-color-for-static-control-text-in-dialog/</link>
	<description>Gold mine of Visual C++ tricks!</description>
	<lastBuildDate>Thu, 12 Jan 2012 15:10:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Jijo Raj</title>
		<link>http://weseetips.com/2008/08/27/how-to-set-color-for-static-control-text-in-dialog/comment-page-1/#comment-12832</link>
		<dc:creator>Jijo Raj</dc:creator>
		<pubDate>Tue, 29 Mar 2011 14:37:01 +0000</pubDate>
		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=421#comment-12832</guid>
		<description>Hi Shane,

Thanks for sharing your ideas!

I totally agree to your points, but only if you have lot of controls to maintain across your product. Then, It&#039;s worth to create a subclassed control. 
But what if you want to color just one or two control? In that case, is it wise to subclass and write the entire DrawItem()? even that for each and every type of control that you&#039;re using in UI?

IMHO, the cost-benefit analysis result would be negative, in that case. 
Well, keep sharing your thoughts, and thanks for your time!

I would recommend another classic article which explains about subclassing by Chris Mauder, which is much simple and straight forward - http://www.codeproject.com/KB/miscctrl/subclassdemo.aspx

Best Regards,
Jijo.</description>
		<content:encoded><![CDATA[<p>Hi Shane,</p>
<p>Thanks for sharing your ideas!</p>
<p>I totally agree to your points, but only if you have lot of controls to maintain across your product. Then, It&#8217;s worth to create a subclassed control.<br />
But what if you want to color just one or two control? In that case, is it wise to subclass and write the entire DrawItem()? even that for each and every type of control that you&#8217;re using in UI?</p>
<p>IMHO, the cost-benefit analysis result would be negative, in that case.<br />
Well, keep sharing your thoughts, and thanks for your time!</p>
<p>I would recommend another classic article which explains about subclassing by Chris Mauder, which is much simple and straight forward &#8211; <a href="http://www.codeproject.com/KB/miscctrl/subclassdemo.aspx" rel="nofollow">http://www.codeproject.com/KB/miscctrl/subclassdemo.aspx</a></p>
<p>Best Regards,<br />
Jijo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shane Diego</title>
		<link>http://weseetips.com/2008/08/27/how-to-set-color-for-static-control-text-in-dialog/comment-page-1/#comment-12778</link>
		<dc:creator>Shane Diego</dc:creator>
		<pubDate>Fri, 25 Mar 2011 22:53:19 +0000</pubDate>
		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=421#comment-12778</guid>
		<description>You would be much better off writing a subclass of CStatic that has the capability of storing and generating its own color.  The technique shown here makes the dialog responsible for color of its controls.  This is akin to having the dialog responsible for the text that appears in each control.  You can do it, by why would you want to?

It makes much more sense to have the control know about itself.  The control knows its position, its text, its state; why not have it know about its color?  After you change the color, the next thing you are going to want to do is change the font.

Here is how: http://www.codeproject.com/KB/miscctrl/hmxcontrols.aspx</description>
		<content:encoded><![CDATA[<p>You would be much better off writing a subclass of CStatic that has the capability of storing and generating its own color.  The technique shown here makes the dialog responsible for color of its controls.  This is akin to having the dialog responsible for the text that appears in each control.  You can do it, by why would you want to?</p>
<p>It makes much more sense to have the control know about itself.  The control knows its position, its text, its state; why not have it know about its color?  After you change the color, the next thing you are going to want to do is change the font.</p>
<p>Here is how: <a href="http://www.codeproject.com/KB/miscctrl/hmxcontrols.aspx" rel="nofollow">http://www.codeproject.com/KB/miscctrl/hmxcontrols.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jijo.Raj</title>
		<link>http://weseetips.com/2008/08/27/how-to-set-color-for-static-control-text-in-dialog/comment-page-1/#comment-206</link>
		<dc:creator>Jijo.Raj</dc:creator>
		<pubDate>Tue, 21 Oct 2008 07:17:18 +0000</pubDate>
		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=421#comment-206</guid>
		<description>You could change the color of other controls as well. Controls such as - Button, Dialog, edit, Listbox, scrollbars etc. For instance, see how to change the color of push button here - http://www.daniweb.com/forums/thread26182.html

Regards,
Jijo.</description>
		<content:encoded><![CDATA[<p>You could change the color of other controls as well. Controls such as &#8211; Button, Dialog, edit, Listbox, scrollbars etc. For instance, see how to change the color of push button here &#8211; <a href="http://www.daniweb.com/forums/thread26182.html" rel="nofollow">http://www.daniweb.com/forums/thread26182.html</a></p>
<p>Regards,<br />
Jijo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pawan</title>
		<link>http://weseetips.com/2008/08/27/how-to-set-color-for-static-control-text-in-dialog/comment-page-1/#comment-205</link>
		<dc:creator>pawan</dc:creator>
		<pubDate>Tue, 21 Oct 2008 05:18:42 +0000</pubDate>
		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=421#comment-205</guid>
		<description>Is it applicable only to static control or i can use it for other</description>
		<content:encoded><![CDATA[<p>Is it applicable only to static control or i can use it for other</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jijo.Raj</title>
		<link>http://weseetips.com/2008/08/27/how-to-set-color-for-static-control-text-in-dialog/comment-page-1/#comment-204</link>
		<dc:creator>Jijo.Raj</dc:creator>
		<pubDate>Wed, 10 Sep 2008 10:57:10 +0000</pubDate>
		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=421#comment-204</guid>
		<description>If you seek plain win32, you could handle WM_CTLCOLORSTATIC and can change the static text color.

Have a look at this link - http://www.winprog.org/tutorial/dlgfaq.html. It contains code samples. Hope it helps.

Regards,
Jijo.</description>
		<content:encoded><![CDATA[<p>If you seek plain win32, you could handle WM_CTLCOLORSTATIC and can change the static text color.</p>
<p>Have a look at this link &#8211; <a href="http://www.winprog.org/tutorial/dlgfaq.html" rel="nofollow">http://www.winprog.org/tutorial/dlgfaq.html</a>. It contains code samples. Hope it helps.</p>
<p>Regards,<br />
Jijo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mehranhu</title>
		<link>http://weseetips.com/2008/08/27/how-to-set-color-for-static-control-text-in-dialog/comment-page-1/#comment-203</link>
		<dc:creator>mehranhu</dc:creator>
		<pubDate>Wed, 10 Sep 2008 06:59:05 +0000</pubDate>
		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=421#comment-203</guid>
		<description>Hi, It really works, ive done it already, But im searching a messive way of the same thing to be done in simple WIN32, not MFC. Can u help me please
mehrangull@hotmail.com</description>
		<content:encoded><![CDATA[<p>Hi, It really works, ive done it already, But im searching a messive way of the same thing to be done in simple WIN32, not MFC. Can u help me please<br />
<a href="mailto:mehrangull@hotmail.com">mehrangull@hotmail.com</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

