Solved

CDialog

Posted on 1998-04-15
2
646 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to monitor remote shell execution on linux 9 100
wordappend challenge 8 172
Problem to event 3 92
unix example issues 18 89
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: 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 …
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

815 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

7 Experts available now in Live!

Get 1:1 Help Now