Sign in to follow this  
jimiwa

ddraw- changing font style/size for TextOut

Recommended Posts

Could someone tell me how to change the font style and size for text that is displayed using the TextOut function?

Share this post


Link to post
Share on other sites
The font used with TextOut is completely defined by the HDC you pass it.

Basically you use SelectObject to select a HFONT into the HDC. A HFONT can be created with CreateFont which gives you enough parameters to tinker with.

Don't forget to unselect the font and DeleteObject the HFONT handle when cleaning up.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
could someone give me some example in code
for how to do this, I don't know what parameters
to pass or any detail at all of these functions.

Share this post


Link to post
Share on other sites
could someone give me some example in code
for how to do this, I don't know what parameters
to pass or any detail at all of these functions.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Go search the MSDN network for those functions listed by the other guy. It takes a while to figure out but you should be able to yourself and you'll learn more.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this