Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Radio Button Caption

Radio Button Caption

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Benjamin Bruno
    wrote on last edited by
    #1

    Hi How to change the radio button caption text color( MFC ).By default it is showing Black color.I want the radio button caption text color, other than default color. Thanks

    L K 2 Replies Last reply
    0
    • B Benjamin Bruno

      Hi How to change the radio button caption text color( MFC ).By default it is showing Black color.I want the radio button caption text color, other than default color. Thanks

      K Offline
      K Offline
      KingsGambit
      wrote on last edited by
      #2

      Check if WM_CTLCOLORSTATIC helps. Checkout http://msdn.microsoft.com/en-us/library/bb787524(VS.85).aspx[^]

      1 Reply Last reply
      0
      • B Benjamin Bruno

        Hi How to change the radio button caption text color( MFC ).By default it is showing Black color.I want the radio button caption text color, other than default color. Thanks

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        In WM_CtlColor Handler write following Code. HBRUSH CTestProjectDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
        if(pWnd->GetDlgCtrlID() == IDC_RADIO1)//For IDC_RADIO1 pDC->SetTextColor(RGB(255,0,0));

        return hbr; }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups