- This topic has 3 replies, 3 voices, and was last updated 16 years ago by autopilot.
-
AuthorPosts
-
April 21, 2008 at 3:50 pm #191150radarguyMember
I’m a beginner with Visual Studio and I’m trying to make a class that would enable me to put Colored Buttons in MFC dialogs and apps (colored texts and backgrounds).
I googled up some ColorButton classes, but they are all pretty old and don’t work with Visual Studio 2005..
Can anyone please help me with some code or useful links, especially with the DrawItem, get and set color functions?
April 21, 2008 at 4:22 pm #191153autopilotMemberare you just trying to change the background & text color of command buttons? if so, use somthing like:
//change background color button1.BackColor = Color.Firebrick; //change text color button1.ForeColor = Color.ForestGreen;
April 21, 2008 at 4:59 pm #191152radarguyMember@autopilot wrote:
are you just trying to change the background & text color of command buttons? if so, use somthing like:
//change background color button1.BackColor = Color.Firebrick; //change text color button1.ForeColor = Color.ForestGreen;
this would probably do for individual buttons, but i’m going for a class/control that can actually create the buttons by drawing them or construct them from the standard command buttons
April 21, 2008 at 6:30 pm #191151ChikeMemberMy guess is you are looking for something like this.
@radarguy wrote:
I googled up some ColorButton classes, but they are all pretty old and don’t work with Visual Studio 2005..
Well MFC is old, no many using it anymore. Doesn’t matter how old they are, the principle is what importang, you can always change it as you see fit.
-
AuthorPosts
Related
- You must be logged in to reply to this topic.