Making A CFont Go Bold
-
I am trying to make the text bold in a CStatic. I wrote the following code, Can anyone see where i am going wrong. CFont *M_titleFont is a member varible. Code Snippet, from oninitdialog: LOGFONT lf; m_titleFont->GetLogFont(&lf); lf.lfWeight = 700; //Set Bold m_titleFont->CreateFontIndirect(&lf); Cheers Rich
-
I am trying to make the text bold in a CStatic. I wrote the following code, Can anyone see where i am going wrong. CFont *M_titleFont is a member varible. Code Snippet, from oninitdialog: LOGFONT lf; m_titleFont->GetLogFont(&lf); lf.lfWeight = 700; //Set Bold m_titleFont->CreateFontIndirect(&lf); Cheers Rich
How do you initialize m_titleFont? Tomasz Sowinski -- http://www.shooltz.com
-
How do you initialize m_titleFont? Tomasz Sowinski -- http://www.shooltz.com
-
I found I had problems using CreateFontIndirect() with an existing font. But it was easier to create a new font instead. LOGFONT lf; m_titleFont->GetLogFont(&lf); lf.lfWeight = 700; //Set Bold CFont boldFont; bolFont.CreateFontIndirect(&lf); // continue to use boldFont Hope this helps. =) =)