Re: Default Font Bolded
"yarp" <lac-3QW3q7+2X3hWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
Really ? So, I will probably end up creating a Font, but this returns back to my initial question: Why is the font bold on first call and then normal ? Does it mean that something in the OnPaint procedure has altered the Font and that -as you pointed out- a new font has been created which is now in use ? I just would like to understand what happened. Yarp --- In [email protected], "Johann Gerell" <johann@...> wrote: > > > thanks, this is very interesting. But I wanted to avoid > > to create a new font and reuse a default DC font instead. > > > > My question was rather: how do I force a given DC font > > boldness to normal ? > > > If you do that, then you *are* creating a new font. > > > /Johann > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf Of yarp > Sent: den 9 mars 2010 08:19 > To: [email protected] > Subject: [wtl] Re: Default Font Bolded > > Hi, > thanks, this is very interesting. But I wanted to avoid to create a new font > and reuse a default DC font instead. > > My question was rather: how do I force a given DC font boldness to normal ? > > Yarp > > --- In [email protected], "Political" <politicalconfusion@> wrote: > > > > I've used SPI_GETNONCLIENTMETRICS with SystemParametersInfo() to get a > default GUI font in the past. Something like this: > > > > NONCLIENTMETRICS ncm; > > ncm.cbSize = sizeof( ncm ); > > SystemParametersInfo( SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0 ); > > ncm.lfCaptionFont.lfWeight = FW_NORMAL; > > HFONT hFont = CreateFontIndirect( &(ncm.lfCaptionFont) ); > > > > > > This creates non-bold Tahoma in WinXP and Segoe UI in Win7. > > > > > > > > > > ------------------------------------ > > Yahoo! Groups Links > ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wtl/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/wtl/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/