Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Win32 Default Height of Edit Control

I'm using CreateWindowEx to create an Edit control (a textbox), but saying CW_DEFAULT doesn't help with getting the default height of the textbox -- it just makes a window with a height of zero.

How do I get the system-default size of a textbox, so I can turn Edit control into a normal-looking textbox?

like image 983
user541686 Avatar asked Mar 05 '11 03:03

user541686


1 Answers

The recommended size is 14 dialog units. Here is the reference

You can use MapDialogRect to convert dialog units into pixels.

like image 180
Ben Voigt Avatar answered Sep 23 '22 00:09

Ben Voigt