Skip to content
Home > Programming > C++ Colored Buttons in Visual Studio 2005

C++ Colored Buttons in Visual Studio 2005

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #191150
    radarguy
    Member

    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?

    #191153
    autopilot
    Member

    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;
    #191152
    radarguy
    Member

    @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

    #191151
    Chike
    Member

    My 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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.