To my real surprise if you load a menu with LoadMenu and then use SetMenu, the menu is a part of the client area and its size should be substracted from the size of vertical scrolbar at WM_SIZE in order to reposition the scrollbar corectly... at runtime.

It hought that window menus are non-client areas...i was wrong

This issue is for scrolbars created with CreatWindowEx not the default window scrollbars...

So i was wondering:
1) how do i get all those little bits needed to resize/reposition controls at runtime use MoveWIndow like: scrolbars size, menu size, toolbar sizes etc etc?
2)Is there an easyer way than to use MoveWindow for all childs in WM_SIZE message processing?
Posted on 2003-06-02 20:36:49 by BogdanOntanu
I suppose that all of that information is in the system metrics. Try GetSystemMetrics it should have a flag for the menu height etc...
Posted on 2003-06-02 21:28:39 by donkey
Apparently, the client area is set by responding to WM_NCCALCSIZE. This message is supposed to be sent when the window is resized or moved. Not sure what happens when menus and scrollbars are drawn in the nonclient area.
Posted on 2003-06-02 23:04:42 by tenkey