Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
See more:
I am using MFC to create a dialog project and trying to impart color to the buttons.

I came to know that the only way you can do is to make the button owner draw. OnCtlColor() does not work for buttons.

I am able to color the button overriding OnDrawItem , but the problem is that , in the process the 3d cool look (with slightly rounded corner that you get in win7) is lost. Is there any way to retain the native look and color the button on top of that?
Posted
Comments
enhzflep 14-Apr-13 2:39am    
I think this page should help: DrawThemeEdge
There are examples around here on CP that deal with windows themes.
kaushik_code 14-Apr-13 4:05am    
Thanks for introducing me to themes, I think I have found the answer on how to achieve this , though I need to try it yet.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd373487(v=vs.85).aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900