How To Calculate the Height of Edit Control to Resize It (124315)
The information in this article applies to:
- Microsoft Windows Software Development Kit (SDK) 3.1
- Microsoft Win32 Software Development Kit (SDK) 3.5
- Microsoft Win32 Software Development Kit (SDK) 3.51
This article was previously published under Q124315 SUMMARY
When a program changes the font of an edit control, it must calculate the
new height of the control so that text is displayed correctly. When an edit
control contains a border, the control automatically adds white space
around the text so the text won't interfere with the border.
This article shows by example how a program can modify the height of an
edit control so that text displayed in the control looks right after the
program changes the font.
Modification Type: | Minor | Last Reviewed: | 6/29/2004 |
---|
Keywords: | kbEditCtrl kbhowto KB124315 |
---|
|