CButton Color :: MFC

This is a discussion on CButton Color :: MFC within the C++ Programming forums, part of the General Programming Boards category; Hi. I would like to know how to change (repaint) a new color for a CButton object, both group and/or ...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    CButton Color :: MFC

    Hi.

    I would like to know how to change (repaint) a new color for a CButton object, both group and/or options.

    For example:

    ...
    CButton mBtnGreen;
    ...

    mBtnGreen.Create("Green", WS_CHILD | WS_VISIBLE | BS_CHECKBOX
    CRect(CPoint(0, 0), CSize(25, 50)), this,
    IDC_BTNOPT_GREEN);

    ...

    By default, the color of option (button) "Green" is light gray, like cream. I would like to change the color of the background of the button and/or text. By default, the text is black.

    I tried repaint the entire client area, but MFC ignores the button areas.

    Thanks,
    Kuphryn

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    206
    wow an actual win32 programmer on this board. amazing. so amazing

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cbutton: disable highlight?
    By PokecCZ in forum Windows Programming
    Replies: 0
    Last Post: 07-03-2008, 12:57 PM
  2. CButton and Bitmap Interface :: MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 02-21-2003, 01:36 PM
  3. Replies: 1
    Last Post: 05-23-2002, 11:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21