Jump to content
  • Advertisement
Sign in to follow this  
jimiwa

ddraw- changing font style/size for TextOut

This topic is 4909 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!