Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Dan Heinz
|
Jul 13, 2004 - 8:14 AM
|
I can’t seem to change the font for CExtCheckBox. It allows me to SetFont, but there is no change. If I change the control back to CButton the font will change. Does CExtCheckBox support different fonts?
|
|
Technical Support
|
Jul 13, 2004 - 11:02 AM
|
Dear Dan,
The CExtCheckBox control is based on the g_PaintManager->m_FontNormal font. But you may code your own class derived from CExtCheckBox and use any font in it. Just override the CExtCheckBox::PaintPushButton virtual method in a way like this:
void C__YOUR__CheckBox::PaintPushButton(
CDC & dc,
CExtPaintManager::PAINTPUSHBUTTONDATA & _ppbd
)
{
ASSERT_VALID( this );
_ppbd.m_hFont = CWnd::GetFont()->GetSafeHandle();
// or use the parent dialog window’s font:
// ppbd.m_hFont = GetParent()->GetFont()->GetSafeHandle();
CExtCheckBox::PaintPushButton( dc,
CExtPaintManager::PAINTPUSHBUTTONDATA & _ppbd );
}
|
|
Dan Heinz
|
Jul 13, 2004 - 3:16 PM
|
Thanks! Works great. I’m assuming I can do the same thing with CExtRadioButton?
|
|
Technical Support
|
Jul 14, 2004 - 7:41 AM
|
Of course, you can. The CExtRadioButton class is derived from CExtCheckBox .
|
|