Shaun Wilde">
Click here to Skip to main content
15,168,105 members
Articles / Desktop Programming / MFC
Article
Posted 24 Jan 2000

Stats

364.1K views
7.9K downloads
58 bookmarked

CUsefulSplitterWnd (An Extension to CSplitterWnd)

Rate me:
Please Sign up or sign in to vote.
4.80/5 (25 votes)
24 Jan 2000CPOL
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)

Share

About the Author

Shaun Wilde
Employed (other) Purplebricks
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.

Comments and Discussions

 
GeneralOnInitialUpdate Pin
hellogany25-Apr-10 21:49
Memberhellogany25-Apr-10 21:49 
GeneralRe: OnInitialUpdate Pin
Shaun Wilde27-Apr-10 2:34
MemberShaun Wilde27-Apr-10 2:34 
GeneralUse of ReplaceView from Inside of worker thread generate crasing. Pin
Le@rner13-Oct-09 20:03
MemberLe@rner13-Oct-09 20:03 
GeneralRe: Use of ReplaceView from Inside of worker thread generate crasing. Pin
Shaun Wilde14-Oct-09 9:18
MemberShaun Wilde14-Oct-09 9:18 
GeneralRe: Use of ReplaceView from Inside of worker thread generate crasing. Pin
Le@rner14-Oct-09 19:10
MemberLe@rner14-Oct-09 19:10 
GeneralRe: Use of ReplaceView from Inside of worker thread generate crasing. Pin
Shaun Wilde15-Oct-09 9:28
MemberShaun Wilde15-Oct-09 9:28 
GeneralOnInitialUpdate Function not working after replacing view. Pin
Le@rner3-Apr-08 20:12
MemberLe@rner3-Apr-08 20:12 
GeneralRe: OnInitialUpdate Function not working after replacing view. Pin
sheeba.ph16-Jun-08 20:59
Membersheeba.ph16-Jun-08 20:59 
GeneralRe: OnInitialUpdate Function not working after replacing view. Pin
Shaun Wilde17-Jun-08 9:50
MemberShaun Wilde17-Jun-08 9:50 
AnswerRe: OnInitialUpdate Function not working after replacing view. Pin
Aletheuein10-Aug-08 5:04
MemberAletheuein10-Aug-08 5:04 
AnswerRe: OnInitialUpdate Function not working after replacing view. Pin
wct7-Jan-09 20:22
Memberwct7-Jan-09 20:22 
GeneralRe: OnInitialUpdate Function not working after replacing view. Pin
Shaun Wilde7-Jan-09 21:34
MemberShaun Wilde7-Jan-09 21:34 
GeneralRe: OnInitialUpdate Function not working after replacing view. Pin
wct10-Jan-09 5:13
Memberwct10-Jan-09 5:13 
GeneralRe: OnInitialUpdate Function not working after replacing view. Pin
Víctor Rodriguez-Doncel17-Jul-09 5:07
MemberVíctor Rodriguez-Doncel17-Jul-09 5:07 
GeneralSplit it into more parts [modified] Pin
neha.agarwal2716-Nov-06 21:15
Memberneha.agarwal2716-Nov-06 21:15 
GeneralRe: Split it into more parts Pin
Shaun Wilde17-Nov-06 9:56
MemberShaun Wilde17-Nov-06 9:56 
GeneralCFormView from a DLL Pin
Ajay L D5-Nov-06 19:26
MemberAjay L D5-Nov-06 19:26 
GeneralRe: CFormView from a DLL Pin
Shaun Wilde17-Nov-06 9:53
MemberShaun Wilde17-Nov-06 9:53 
GeneralCSplitterWnd in SDI Pin
Bhushan19806-Jul-06 21:36
MemberBhushan19806-Jul-06 21:36 
GeneralRe: CSplitterWnd in SDI Pin
Shaun Wilde6-Jul-06 22:03
MemberShaun Wilde6-Jul-06 22:03 
QuestionHow to create a PaneView, the Form is in a DLL. Pin
HFHero.William28-May-06 21:10
MemberHFHero.William28-May-06 21:10 
AnswerRe: How to create a PaneView, the Form is in a DLL. Pin
Shaun Wilde29-May-06 1:35
MemberShaun Wilde29-May-06 1:35 
GeneralRe: How to create a PaneView, the Form is in a DLL. [modified] Pin
HFHero.William29-May-06 6:55
MemberHFHero.William29-May-06 6:55 
GeneralRe: How to create a PaneView, the Form is in a DLL. [modified] Pin
Shaun Wilde29-May-06 10:06
MemberShaun Wilde29-May-06 10:06 
GeneralRe: How to create a PaneView, the Form is in a DLL. [modified] Pin
HFHero.William29-May-06 18:15
MemberHFHero.William29-May-06 18:15 

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

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