|
-
July 23rd, 2010, 05:17 PM
#2
Re: Need clarification about CreateFontIndirect
Hi! The font creation functions will *never* fail, because the system will return the handle to a font that is similar to the one you described with the fontfamily, pitch, width, etc... parameters passed to these functions (raw or inside a LOGFONT structure). However, if you pass an invalid parameter, it will fail, but the wrong facename won't cause a failure.
So you'll always end up with a valid HFONT, no matter what facename you specify... You may try checking if an specific font exists, by enumerating the font families (check EnumFontFamiliesEx on MSDN).
Hope it helps.
Regards.
"A program is never less than 90% complete, and never more than 95% complete."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|