Visual Studio .NET - CButton border color - Asked By chen hong on 13-Nov-11 12:09 PM

How can I change the border color of  the CButton object in MFC?
dipa ahuja replied to chen hong on 13-Nov-11 01:37 PM
http://www.codeproject.com/KB/buttons/cbuttonst.aspx

http://www.functionx.com/visualc/controls/mfcbtn.htm
Kirtan Patel replied to chen hong on 13-Nov-11 02:34 PM
here is article about changing MFC VC++ Button Style 

http://www.eggheadcafe.com/microsoft/VC-MFC/30999172/changing-default-buttons.aspx

thanks
Neha Garg replied to chen hong on 13-Nov-11 02:52 PM
Hello Chen,

Use the below details for the change of button border color:

XP uses different colors to draw button border, such as RGB(241,239,226), RGB(113,111,100), I only use black and white colors - easy or lazy.
XP operating system loses much 3D effects than 95/98/NT because of its default dialog color.
Riley K replied to chen hong on 13-Nov-11 08:44 PM


Here is a sample to change the border color
http://www.codeguru.com/forum/showthread.php?t=294500 

For Windows API, you need to subclass the control and paint the border. 
http://msdn.microsoft.com/en-us/library/ms633570(VS.85).aspx#subclassing_window 
Refer this links also

http://www.codeproject.com/KB/buttons/ColorButton.aspx

Regards
Jitendra Faye replied to chen hong on 13-Nov-11 11:07 PM

A simple project with a working button is available http://people.msoe.edu/~taylor/examples/buttonColoring.zip.

 



Follow this link -

http://people.msoe.edu/~taylor/examples/colorButton.htm

Hope this will help you.