![]() |
SetFont(BOLD or UNDERLINE) |
Post Reply
|
| Author | ||
jwhagen
Groupie
Joined: 09 May 2003 Location: United States Status: Offline Points: 43 |
Post Options
Thanks(0)
Quote Reply
Topic: SetFont(BOLD or UNDERLINE)Posted: 21 April 2005 at 7:57am |
|
|
I'm trying to set the Title to be in BOLD font and UNDERLINED but don't know how to make this work. I can get one or the other, but not both. Any help would be appreciated! // set the title text to bold font. In the instance above, whatever line is last is the one that works. In this example, the font is does not display as BOLD, but only UNDERLINED. Can they be ORd together? If so, how? John Hagen |
||
![]() |
||
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 21 April 2005 at 11:17pm |
|
|
You must create new font NONCLIENTMETRICS ncm = { sizeof(NONCLIENTMETRICS) };VERIFY(::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, 0));ncm.lfSmCaptionFont.lfWeight = FW_BOLD; ncm.lfSmCaptionFont.lfUnderline = 1;
font.CreateFontIndirect(&ncm.lfSmCaptionFont); |
||
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
||
jwhagen
Groupie
Joined: 09 May 2003 Location: United States Status: Offline Points: 43 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 April 2005 at 1:41pm |
|
|
Hi Oleg, Thanks for your quick response! I tried what you suggested and I was still unable to have the title underlined AND in bold. This is what I used in the ListCtrl_vc60 sample program, in the AboutDlg.h file:
then...
All I get is the new font in bold, without the underline. Suggestions? John Hagen
Edited by jwhagen |
||
![]() |
||
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 April 2005 at 11:10pm |
|
|
I create new sample and it works. Check if myFont is member of CAboutDlg. |
||
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
||
jwhagen
Groupie
Joined: 09 May 2003 Location: United States Status: Offline Points: 43 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 April 2005 at 6:47am |
|
|
You were correct. I did not have myFont as a member of CAboutDlg. Thanks for setting me straight. It now works great! John Edited by jwhagen |
||
![]() |
||
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |