Search:
Forum
General C++ Programming
if have font name, font size of text==>
if have font name, font size of text==> text width and text height ???
Sep 1, 2009 at 2:02am UTC
aazz
(2)
hi everybody.
i using vc++6.0. i needing to calculate text width and text height when have font size and font name of text.
hopy everybody help me.
thanks very much
Sep 1, 2009 at 2:20am UTC
Duthomhas
(13281)
http://www.google.com/search?btnI=1&q=msdn+GetTextExtentPoint32
(if you have tabs in the string:
http://www.google.com/search?btnI=1&q=msdn+GetTabbedTextExtent
)
You need to select the font into a device context (using
SelectObject
() ).
Click around there for a while and read up on handling fonts in Windows.
Good luck!
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs