Re: Default Font Bolded
"Johann Gerell" <[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <004e01cabf5c$47c0baf0$d74230d0$@net> |
> 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/