I try to change the MFC checkbox back ground color (or just
transparent) but it did not show anything but an emptyh gray area. I
did override the OnCtlColor() and on RrawItem() I called the default
but the Check box never show even the callback are called
sueecssfully. As long as I set it as 'BS_OWNERDRAW it never shows the
Check box. Am I missing something?
Thanks in advance.
CK
BS_OWNERDRAW means you are going to paint the control yourself, in
OnDraw. It turns off all of the built in painting. I think you will
have to do that to get nonstandard color.
Thanks for reply. But I did call pDC->SetBkColor() in the CtlColor()
and call the default CDialog::OnDrawItem(nIDCtl, lpDrawItemStruct) in
OnDraw() so it should have the new BK color and draw the check box.
What else do I need to make it work (without draw the spuare and text
myself)?
Thanks again.
ck
Check http://flounder.com/dialog_box_color.htm. It shows how to change
the background of most kinds of controls.
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm