Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual C++ - Dialog window resize problem

Status
Not open for further replies.

srossi

Industrial
Joined
Apr 13, 2002
Messages
2
Location
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

 
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.

Part and Inventory Search

Sponsor

Back
Top