Fonts - again

"Nenad Stefanovic" <[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <000001cae1f9$05cabf00$11603d00$@com>
Hi everybody,

 

Recent discussion about fonts left me with a feeling that we don't have
everything that we need. The famous "universal" font that is just right at
any moment for any use simply doesn't exist. Default GUI font, returned by
AtlGetDefaultGuiFont() is not the right one by any means, but it is so
convenient - a stock font that is just there, no need to create or destroy
it.

 

Can we have anything better? I continued to think about this and concluded
that at least we should have the font that some common controls use by
default. For example, when you create a ListView in a window (not in a
dialog), it doesn't use the system font, but one that looks just fine on
WinXP as well as Win7. That font is the Icon Title font, and information
about it is returned by SystemParametersInfo with SPI_GETICONTITLELOGFONT.

 

I created new helper function, AtlCreateControlFont() that creates and
returns this font. I also changed the rest of WTL to use thins new function
instead of AtlGetDefaultGuiFont(). If you use a control that doesn't have
the font set, or if you create your own custom control, you can now use this
font as a default font for it.

 

Remember that this is just a default font. The right font to use is based on
version of Windows at runtime, as well as the language that your application
is displaying. You take that into account, pick the right font, and use it
directly.

 

Cheers,

Nenad

 



[Non-text portions of this message have been removed]



------------------------------------

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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.