|
-
May 4th, 1999, 09:48 AM
#1
Bolding and Underlining Radio button
Hi All,
I have my radio button(IDC_BUTTON1)on a form view. I am underlining its caption(title) using the following code.
void CMyFontView::OnUnderline()
{
// TODO: Add your control notification handler code here
LOGFONT m_lf;
CFont m_font;
::GetObject((HFONT)GetStockObject(DEFAULT_GUI_FONT),sizeof(m_lf),&m_lf);
m_font.CreateFontIndirect(&m_lf);
m_lf.lfWeight = FW_NORMAL;
m_lf.lfUnderline = TRUE;
m_font.DeleteObject();
BOOL bCreated = m_font.CreateFontIndirect(&m_lf);
CButton* pButton1 = (CButton*)GetDlgItem(IDC_RADIO1);
pButton1->SetFont(&m_font, TRUE);
pButton1->RedrawWindow();
}
It has underlined the caption of the radio button.
Now I clicked on the my radio button. Now when I navigate to some other control(my radio button is losing focus), underline is gone and radio button font became bold.
Can someone tell me what is the problem and how to solve it.
Thanks in advance
Vasu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|