Solved

window size

Posted on 2000-04-03
2
178 Views
Last Modified: 2013-11-20
I need to constant windows size ( cdialog based) for all windows systems ( with all font settings ) I need to fix window size in pixels.
0
Comment
Question by:cdesigner
2 Comments
 
LVL 4

Expert Comment

by:abancroft
ID: 2681467
Use MoveWindow() to resize the dialog. The parameters are in pixels.
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 50 total points
ID: 2682498
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

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question