Solved

CDialog

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
Tab names are off by one 5 54
How to know only "File created" with EventLog 3 35
maxBlock challenge 30 146
Authenticate using sesu from script 7 118
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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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 implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

696 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