CUsefulSplitterWnd (An Extension to CSplitterWnd)






4.82/5 (24 votes)
An extension to MFCs CSplitterWnd that provides splitter locking and dynamic view replacement
The CUsefulSplitterWnd
class presents two extensions to CSplitterWnd
.
- The first extension is the ability to lock the bar in position so that it can no longer be moved.
// bar is locked using LockBar(TRUE) m_wndSplitter.LockBar(TRUE); // and is unlocked using LockBar(FALSE) m_wndSplitter.LockBar(FALSE);
- The second extension allows the views in each pane to be changed dynamically using the
ReplaceView()
method.// to replace a view in a pane you use ReplaceView m_wndSplitter.ReplaceView(0,1,RUNTIME_CLASS(CForm1),CSize(100,100));
This would replace the view in row 0, column 1 with
CForm1
and with a minimum size of 100x100.