Solved

window size

Posted on 2000-04-03
2
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

735 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