I'm a little bit confused after all. Which is the best and most efficient way to handle resizing? It is ambiguous for me a little bit.

I think the WM_WINDOWPOSCHANGING is good to do some task before the sizing of the windows, and WM_WINDOWPOSCHANGED can be used to resize the child windows and controls of the window after the resizing is done and the window's new size is known. And of course the WM_GETMINMAXINFO is used for set the limits of the window.

If I'm not right, please feel free to correct me.
Thanks.
Posted on 2004-07-15 04:13:10 by bszente
I think that's correct. The task that you mention WM_WINDOWPOSCHANGING can perform before sizing of the windows could be to limit the window size in, for example, a custom control - as this won't receive WM_GETMINMAXINFO.
Posted on 2004-07-15 06:11:48 by adamjjackson

I'm a little bit confused after all. Which is the best and most efficient way to handle resizing? It is ambiguous for me a little bit.

I think the WM_WINDOWPOSCHANGING is good to do some task before the sizing of the windows, and WM_WINDOWPOSCHANGED can be used to resize the child windows and controls of the window after the resizing is done and the window's new size is known. And of course the WM_GETMINMAXINFO is used for set the limits of the window.

If I'm not right, please feel free to correct me.
Thanks.


That is what I find most efficient, the WM_WINDOWPOSxxx messages to handle pre and post sizing and WM_GETMINMAXINFO to set the limits. What I was reffering to was how some handle the WM_SIZING and WM_SIZE messages to deal with size changes, they are not as efficient and clumsy to implement. However if you do not have any pre-sizing set up, and I have never found a situation where I needed it, the WM_WINDOWPOSCHANGED with WM_GETMINMAXINFO is fine for most applications.
Posted on 2004-07-15 11:09:18 by donkey
Now it's clear for me, I understand.
I didn't find either situation to pre-process any of the data. Eventually as adamjjackson said, for custom controls. Or who knows, to set the SWP_HIDEWINDOW flag to hide the window when it is resized or moved :grin: :grin:
Posted on 2004-07-15 13:51:39 by bszente