WM_SIZING

Phil
11-01-2000, 07:06 AM
Hi,

I wish to limit the range of dimensions of a form when it is being resized by the user. The rather clunky way I've done this up to now is to check and if necessary reset the form's dimensions in the resize event. What I'd prefer to do is to hook the WM_SIZING message and by changing the RECT parameter limit the dimensions of the form. I've used hooks previously and am able to redirect the WM_SIZING message to a proceedure but need help from there on.

If anyone has any experience using this message or can post an example it would help me greatly.

Thanks a lot,
Phil.

Jared
11-01-2000, 08:09 PM
I believe there is an example at VB Accelerator using their subclassing control to only allow a form to go so small. You should be able to use this as reference to apply to your own app.

The example download is on this page...
<A HREF="http://vbaccelerator.com/codelib/ssubtmr/ssubtmr.htm" target="_new">http://vbaccelerator.com/codelib/ssubtmr/ssubtmr.htm</A>

Also there is some code near the bottom of the page to do this.

Hope this helps...


Jared Hoylman

Please visit VB Overdrive at <A HREF="http://www.extreme-vb.net/vboverdrive/" target="_new">http://www.extreme-vb.net/vboverdrive/</A>

Phil
11-02-2000, 07:32 AM
Hi,

Thanks for the reply with a little tweaking it works a treat

Cheers

Phil

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum