Solved

Dialog Box Size

Posted on 1998-11-24
3
211 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

747 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

15 Experts available now in Live!

Get 1:1 Help Now