[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

CDialog

Posted on 1998-04-15
2
Medium Priority
?
674 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 40 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

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 (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

834 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