Solved

CDialog

Posted on 1998-04-15
2
621 Views
Last Modified: 2013-11-20
I would like to resize the dialog programatically. How to access functions like height and width?
0
Comment
Question by:fmichaud061597
2 Comments
 

Accepted Solution

by:
javan earned 10 total points
ID: 1317772
You can use GetWindowRect to get the dimensions of the current dialog.  You can use SetWindowPos or MoveWindow to resize the window.  Remember that CDialog is a CWnd so you can use CWnd functions on it.


CMyDialog dlg;
CRect rcSize;

//Gets the dimensions fo the dialog box
dlg.GetWindowRect(rcSize);

//CRect has Width() and Height() member functions
int nWidth = rcSize.Width();
int nHeight = rcSize.Height();

dlg.SetWindowPos(&wndTop, 0,0,50,50, 0);
0
 

Author Comment

by:fmichaud061597
ID: 1317773
Thank you!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 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

16 Experts available now in Live!

Get 1:1 Help Now