
How to add tab ctrl or fixed size window to splitter or list view
Quote:
> Hi,
> I have a splitter window consiting of two list views that divide my window
> equaly (top/bottom), and the split can be adjusted verticaly.
> Can any one tell me how I can add a tab control to the top of my splitter
> window?
> I have tried the following approaches so far:
> 1) I specified a third pain at the top of my splitter window but I could not
> prevent the user from resizing this pain.
> 2) I tried to put the splitter into a child window (CWnd) so that I could
> fix the possition of the splitter, I ended up with a screen that didnt
> refresh properly.
> 2) I tried to resize the CListCtrl element of the CListView window in the
> top pain so that I could insert the tab control into the top of the
> CListView but this did not have any effect
> Darryl
One way would be to use a CDialogBar with a tab control on it. This
would give you a fixed-height area at the top, above and outside of the
splitter.
Another way would be to use the three-pane splitter that you tried. To
disable the resizing you would derive your own class from CSplitterWnd
and handle the mouse messages and WM_SETCURSOR message. In these
message handlers you call the base class only when you want to permit
resizing. You can make the top pane a fixed size by handling WM_SIZE in
your derived splitter. In the handler you call GetRowInfo, modify the
height, call SetRowInfo and call RecalcLayout.
--
Scott McPhillips [VC++ MVP]