Hi Friends,

I need to subclass a checkbox, and that is of CButton class. I tried that, and overwrite OnPaint(), however the check box disappears, I guess that is because I would need to paint the checkbox as well, well, that is beyond my knowledge, so I tried to overwrite OnCtlColor, however that doesn't get called.

One post said that I would need to set the ownerdraw flag, I tried that it doesn't work with the following:

m_chk.SubclassDlgItem(IDC_CHK1, this);

DWORD style = m_chk.GetStyle();
style |= BS_OWNERDRAW;
::SetWindowLong(m_chk, GWL_STYLE, style);
I placed this in OnInitDlg.

Please help, am I understanding this correctly and how to fix this.

Basically I need to change the font size/color of the checkbox text but still retain the checkbox bitmap itself since I don't know how to drawt that.