http://andyuk2010.blogspot.com/2011/...-controls.html

0 down vote


The above blog posting has instructions on how to create a minimalist re-sizeable dialog in MFC.

It is basically an implementation of Paulo Messina's posting at CodeProject but with as much extraneous stuff removed as possible, just to help clarify how to do it better.

It is fairly straightforward to implement once you've had a bit of practice: the important bits are to:

i. ensure you have his CodeProject libraries etc pulled into your project and it all compiles correctly.

ii. do the extra initialization required inside the OnInitDialog method: make the gripper visible, set the maximum dilog size, add anchor points to the dialog control items that you wish to 'stretch' etc.

iii. Replace usage of CDialog with CResizableDialog at the appropriate points: in the dialog class definition, constructor, DoDataExchange, BEGIN_MESSAGE_MAP, OnInitDialog etc.