|
-
April 13th, 1999, 02:54 PM
#1
Calculating lenght of text in a dialog control
I am writing a program that analyses RC files and reports stuff like word
count, number of resources, and so on. I would like to implement a function
which reports clipped strings in controls (if the control is too small for
the text). Does anybody know how to calculate the size of a control so the
text will fit?
Thanks.
-
April 13th, 1999, 03:33 PM
#2
Re: Calculating lenght of text in a dialog control
You can use the function called ::GetTabbedTextExtent() or ::GetTextExtent() to calculate the size of the text, you must pass in a handle to a DC so that it can get the font information about the text string.
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
|