Click here to Skip to main content
Click here to Skip to main content

CUsefulSplitterWnd (an extension to CSplitterWnd)

, 24 Jan 2000
Rate this:
Please Sign up or sign in to vote.
An extension to MFCs CSplitterWnd that provides splitter locking and dynamic view replacement

The CUsefulSplitterWnd class presents two extensions to CSplitterWnd.

  1. 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);
    
  2. 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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Shaun Wilde
Software Developer (Senior) MYOB
Australia Australia
All articles are supplied as-is, as a howto on a particular task that worked for me in the past. None of the articles are supposed to be out-of-the-box freeware controls and nor should they be treated as such. Caveat emptor.
 
Now living and working in Australia, trying to be involved in the local .NET and Agile communities when I can.
 
I spend a good chunk of my spare time building OpenCover and maintaining PartCover both of which are Code Coverage utilities for .NET.
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

 
GeneralOnInitialUpdate Pinmemberhellogany25-Apr-10 20:49 
GeneralRe: OnInitialUpdate PinmemberShaun Wilde27-Apr-10 1:34 
GeneralUse of ReplaceView from Inside of worker thread generate crasing. Pinmember"_$h@nky_"13-Oct-09 19:03 
GeneralRe: Use of ReplaceView from Inside of worker thread generate crasing. PinmemberShaun Wilde14-Oct-09 8:18 
GeneralRe: Use of ReplaceView from Inside of worker thread generate crasing. Pinmember"_$h@nky_"14-Oct-09 18:10 
GeneralRe: Use of ReplaceView from Inside of worker thread generate crasing. PinmemberShaun Wilde15-Oct-09 8:28 
GeneralOnInitialUpdate Function not working after replacing view. PinmemberThatsMe.3-Apr-08 19:12 
GeneralRe: OnInitialUpdate Function not working after replacing view. Pinmembersheeba.ph16-Jun-08 19:59 
GeneralRe: OnInitialUpdate Function not working after replacing view. Pinmember Shaun Wilde 17-Jun-08 8:50 
AnswerRe: OnInitialUpdate Function not working after replacing view. PinmemberAletheuein10-Aug-08 4:04 
AnswerRe: OnInitialUpdate Function not working after replacing view. Pinmemberwct7-Jan-09 19:22 
GeneralRe: OnInitialUpdate Function not working after replacing view. PinmemberShaun Wilde7-Jan-09 20:34 
GeneralRe: OnInitialUpdate Function not working after replacing view. Pinmemberwct10-Jan-09 4:13 
GeneralRe: OnInitialUpdate Function not working after replacing view. PinmemberVíctor Rodriguez-Doncel17-Jul-09 4:07 
GeneralSplit it into more parts [modified] Pinmemberneha.agarwal2716-Nov-06 20:15 
GeneralRe: Split it into more parts PinmemberShaun Wilde17-Nov-06 8:56 
GeneralCFormView from a DLL PinmemberAjay L D5-Nov-06 18:26 
GeneralRe: CFormView from a DLL PinmemberShaun Wilde17-Nov-06 8:53 
GeneralCSplitterWnd in SDI PinmemberBhushan19806-Jul-06 20:36 
GeneralRe: CSplitterWnd in SDI PinmemberShaun Wilde6-Jul-06 21:03 
QuestionHow to create a PaneView, the Form is in a DLL. PinmemberHFHero.William28-May-06 20:10 
AnswerRe: How to create a PaneView, the Form is in a DLL. PinmemberShaun Wilde29-May-06 0:35 
GeneralRe: How to create a PaneView, the Form is in a DLL. [modified] PinmemberHFHero.William29-May-06 5:55 
GeneralRe: How to create a PaneView, the Form is in a DLL. [modified] PinmemberShaun Wilde29-May-06 9:06 
GeneralRe: How to create a PaneView, the Form is in a DLL. [modified] PinmemberHFHero.William29-May-06 17:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 25 Jan 2000
Article Copyright 2000 by Shaun Wilde
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid