Solved

window size

Posted on 2000-04-03
2
176 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now