Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Visual C++ - Dialog window resize problem

Status
Not open for further replies.

srossi

Industrial
Apr 13, 2002
2
0
0
FR
Hi everybody,

I just want to know how I can resize automatically my buttons, edit controls and others things that are in my dialog window when i resize the dialog window ?

Please a need help

Thanks

 
Replies continue below

Recommended for you

srossi,
You have to use your dialog's method OnSize.
Use class wizard to add method OnSize to the code. Within the code, you determine the resized size of the window by using GetWindowSize();
You also add member variables in class wizard for each of your button/editbox items like m_OK, m_cancel, m_edit1 etc.

Now you add code within OnSize to change the button sizes using SetWindowRgn() method.
Hope it works.
flame
 
Status
Not open for further replies.
Back
Top