Solved

Dialog Box Size

Posted on 1998-11-24
3
214 Views
Last Modified: 2010-04-01
How do I choose / control the size of a dialog box when I run the code which opens it ?

Thanks,
A.
0
Comment
Question by:decornez
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
AlFa earned 10 total points
ID: 1178557
You can do this in the WM_INITDIALOG message response with a call to
BOOL MoveWindow(  HWND hWnd, // handle to window
  int X,          // horizontal position  
  int Y,          // vertical position
  int nWidth,     // width  
  int nHeight,    // height
  BOOL bRepaint   // repaint flag);

0
 

Author Comment

by:decornez
ID: 1178558
AIFa,

It is the correct function, but all I had to do was :

MoveWindow(50,50,300,500); //for example

no BOOL, no HWND needed.

Not sure why. Anyway, it does not matter as long as it works.

Thanks,
A.
0
 
LVL 2

Expert Comment

by:AlFa
ID: 1178559
You are in the C++ topic, so i was not extected to give a response using MFC
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need some help with listview limit text 20 104
C++ assignment question 7 199
Focus not getting shifted out of  editbox 2 63
Need some help with Microsoft Visual Studio C++ 2003 5 61
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

803 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