Click here to Skip to main content
Click here to Skip to main content
Go to top

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)

Share

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 
AnswerRe: How to create a PaneView, the Form is in a DLL. [modified] PinmemberHFHero.William2-Jun-06 5:54 
GeneralRe: How to create a PaneView, the Form is in a DLL. [modified] PinmemberShaun Wilde4-Jun-06 21:20 
GeneralI don't want to destroy existed view(formview) Pinmemberforhug3-Apr-06 4:57 
GeneralRe: I don't want to destroy existed view(formview) PinmemberShaun Wilde3-Apr-06 7:22 
GeneralRe: I don't want to destroy existed view(formview) Pinmemberforhug3-Apr-06 18:52 
AnswerRe: I don't want to destroy existed view(formview) [modified] PinmemberZeugmaBarter26-May-06 11:36 
GeneralRe: I don't want to destroy existed view(formview) [modified] PinmemberShaun Wilde29-May-06 0:37 
QuestionRe: I don't want to destroy existed view(formview) Pinmemberbilsby27-Mar-08 6:17 
GeneralRe: I don't want to destroy existed view(formview) Pinmember Shaun Wilde 28-Mar-08 21:21 
GeneralRe: I don't want to destroy existed view(formview) PinmemberPRMARJORAM30-Mar-09 3:54 
GeneralLittle ehancement PinmemberRatmangg25-Mar-04 23:03 
GeneralThanks Pinmembersir kaber25-Dec-03 19:36 
GeneralPrint & Print Preview with a splitter window PinmemberNotBad22-Sep-03 5:32 
GeneralRe: Print & Print Preview with a splitter window PinmemberShaun Wilde22-Sep-03 10:31 
GeneralRe: Print & Print Preview with a splitter window PinmemberNotBad22-Sep-03 22:27 
GeneralRe: Print & Print Preview with a splitter window PinmemberShaun Wilde22-Sep-03 22:50 
GeneralRe: Print & Print Preview with a splitter window PinmemberNotBad22-Sep-03 23:01 
Generalhide the split bar Pinmemberykuang10-Sep-03 23:26 
GeneralRe: hide the split bar PinmemberShaun Wilde11-Sep-03 7:50 
GeneralRe: hide the split bar Pinmemberqcha0s20-Aug-04 5:27 
GeneralRe: hide the split bar PinmemberShaun Wilde22-Aug-04 6:19 
GeneralRe: hide the split bar Pinmemberqcha0s2-Sep-04 8:16 
GeneralRe: hide the split bar PinmemberShaun Wilde2-Sep-04 9:50 
GeneralRe: hide the split bar Pinmemberqcha0s3-Sep-04 4:37 
GeneralThanks so much PinmemberRadha Nair2-Jul-03 21:03 

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
Web01 | 2.8.140926.1 | Last Updated 25 Jan 2000
Article Copyright 2000 by Shaun Wilde
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid