Jump to content
  • Advertisement
Sign in to follow this  
Dark Star

Finding out how many pixels text is using...

This topic is 5410 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

Hi Guys, I just wanted to know if its possible some how to find out how many pixels text is occupying. Say for example you select a font into your device context and draw a string with it, such as "Hello World", is it possible to know how many pixels horizontally it used. Or even know how many pixels each character uses depending on their size? Im creating my GUI tool, just for fun (yes I know I can build a GUI using standard win32 coding and the resources in VC) and I want to model a textbox for data entry. Could anyone give me an insight into how scrolling of text is handled so that as you type the old text is shifted to the left and clipped out of view. Thanks in advance DarkStar UK

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!