window size

I need to constant windows size ( cdialog based) for all windows systems ( with all font settings ) I need to fix window size in pixels.
LVL 9
cdesignerAsked:
Who is Participating?
 
RONSLOWConnect With a Mentor Commented:
but this will not fix the size of controls.

dialog specificationds are in dialog uints (1/4 character width and height if I remember).

You'll need to change the font for the dialog to be a known size.

You can use GetFont and SetFont on the dialog to do this.  Get the font, use GetObject to get a LOGFONT, adjust the values, create a new CFont from it (make sure it doesn't disappear .. a static is good), then use SetFont to make that the font for the dialog.

I'm not sure exactly when to do this .. probably in an OnCreate ??? I'd need to investigate further, but this may give you a starting point.

0
 
abancroftCommented:
Use MoveWindow() to resize the dialog. The parameters are in pixels.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.