Coloring text of a checkbox
-
How can this be done? I know how to change its background color but the text I can't get right...
This is one of the features I plan to add to FooButton[^]. Will let you know when the article is updated. Meanwhile, you might want to check out (pun intended) some of the other owner drawn buttons here[^]. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com
-
How can this be done? I know how to change its background color but the text I can't get right...
Hi, I'm a beginner but I tried to figure it out for you. The following code doesn't work, but it's what I came up with, and maybe it will give you some ideas. I have a simple dialog box with a few controls and I added this function to the Dialog class(CCodeProject_Dialog2Dlg): HBRUSH CCodeProject_Dialog2Dlg::OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); if(pWnd->GetDlgCtrlID() == IDC_WIN98) { pDC->SetTextColor(RGB(255,0,0)); pDC->SetBkMode(TRANSPARENT); } return hbr; } How did you set the background color? I can't believe the previous poster wouldn't help you. I clicked on the link he posted, and any of the author's of those button programs should be able to tell you how to do that. Also, what's up with a programming forum that doesn't allow you to post indented code?