> I would like to either:
> a. Prevent the toolbars from being dragged into two (or more) rows.
> Keep them all docked in one row at the top, or
> b. Know how many rows of toolbars exist, so I can manually subtract the
> extra height when necessary. (I guess I could get the screen rect of
> every toolbar and determine how many rows exist by examining the y
> values of each toolbar, but that seems unnecessarily difficult).
>
> Or, if there are other ideas, I'm all ears.

Try using CFrameWnd::RepositionBars(). This will allow you to calculate how
much client area is left in the frame after toolbars are extracted (and
status bars, for that matter). This will then give you the area occupied by
the splitter wnd, and you should be able to subtract 2 x SM_CYEDGE (for the
3D edges between splitter outer and view outer) to get the client height of
the view.

If that doesn't work, you MIGHT try adding a handler for WM_SIZE in the
view, and recording the width and height that gives each time (but still
allow the call to the base class!); by ignoring the times when it's resizing
for other reasons than the parent resizing (such as creation time), you
should be able to /track/ the correct height rather than query it.

--
Jason Teagle
[EMAIL PROTECTED]



_______________________________________________
msvc mailing list
[EMAIL PROTECTED]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription 
changes, and list archive.

Reply via email to