Solved

window size

Posted on 2000-04-03
2
181 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.

739 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