what is the thing called that resizes two clients at the same time?
like the one in explorer between the treeview and the listview?
or if it is just one window being resized and the other getting adjusted to fit, how do you limit dragging only one side?
thanx,
dc
Usually referred to as a "splitter" (window/bar)
You can do it in a number of ways (as with everything :P)
One way is to create a child window (with no real contents, borders, etc) and place it between the two windows (if you need more than two, then you need more 'splitters') making its width only 2 or 3 and set its cursor to the sideways or upanddown resizer one.
Then you have to catch WM_LBUTTONDOWN and this starts the resizing. Then you SetCapure, and use the WM_MOUSEMOVE messages to see where to MoveWindow your splitter. And at the same time as you MoveWindow the splitter, you also MoveWindow its two friends (which you'll adjust the paramaters make them resize.) And then when you get WM_LBUTTONUP, you can ReleaseCapture, and presto - it is done!
That's the proper way to do it (so says I) - a little more cheaply (and dirty :bdg), you can avoid creating the extra window, size the two windows to leave a litle gap between them, and set the cursor of the parent, then just start dragging on WM_LBUTTONDOWN on the parent's background, use WM_MOUSEMOVE (without setting capture), and stop sizing on WM_LBUTTONUP. This is limited to only one splitter though.
thanx there Tedd,
once again you haved saved my life,
take care,
DC