Click here to Skip to main content
11,428,876 members (62,923 online)
Click here to Skip to main content

CUsefulSplitterWnd (an extension to CSplitterWnd)

, 24 Jan 2000 CPOL
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 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
"_$h@nky_"13-Oct-09 20:03
member"_$h@nky_"13-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
"_$h@nky_"14-Oct-09 19:10
member"_$h@nky_"14-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
ThatsMe.3-Apr-08 20:12
memberThatsMe.3-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 Wilde 17-Jun-08 9:50
member Shaun Wilde 17-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 
AnswerRe: How to create a PaneView, the Form is in a DLL. [modified] Pin
HFHero.William2-Jun-06 6:54
memberHFHero.William2-Jun-06 6:54 
GeneralRe: How to create a PaneView, the Form is in a DLL. [modified] Pin
Shaun Wilde4-Jun-06 22:20
memberShaun Wilde4-Jun-06 22:20 
GeneralI don't want to destroy existed view(formview) Pin
forhug3-Apr-06 5:57
memberforhug3-Apr-06 5:57 
GeneralRe: I don't want to destroy existed view(formview) Pin
Shaun Wilde3-Apr-06 8:22
memberShaun Wilde3-Apr-06 8:22 
GeneralRe: I don't want to destroy existed view(formview) Pin
forhug3-Apr-06 19:52
memberforhug3-Apr-06 19:52 
AnswerRe: I don't want to destroy existed view(formview) [modified] Pin
ZeugmaBarter26-May-06 12:36
memberZeugmaBarter26-May-06 12:36 
GeneralRe: I don't want to destroy existed view(formview) [modified] Pin
Shaun Wilde29-May-06 1:37
memberShaun Wilde29-May-06 1:37 
QuestionRe: I don't want to destroy existed view(formview) Pin
bilsby27-Mar-08 7:17
memberbilsby27-Mar-08 7:17 
GeneralRe: I don't want to destroy existed view(formview) Pin
Shaun Wilde 28-Mar-08 22:21
member Shaun Wilde 28-Mar-08 22:21 
GeneralRe: I don't want to destroy existed view(formview) Pin
PRMARJORAM30-Mar-09 4:54
memberPRMARJORAM30-Mar-09 4:54 
GeneralLittle ehancement Pin
Ratmangg26-Mar-04 0:03
memberRatmangg26-Mar-04 0:03 
GeneralThanks Pin
sir kaber25-Dec-03 20:36
membersir kaber25-Dec-03 20:36 
GeneralPrint & Print Preview with a splitter window Pin
NotBad22-Sep-03 6:32
memberNotBad22-Sep-03 6:32 
GeneralRe: Print & Print Preview with a splitter window Pin
Shaun Wilde22-Sep-03 11:31
memberShaun Wilde22-Sep-03 11:31 
GeneralRe: Print & Print Preview with a splitter window Pin
NotBad22-Sep-03 23:27
memberNotBad22-Sep-03 23:27 
GeneralRe: Print & Print Preview with a splitter window Pin
Shaun Wilde22-Sep-03 23:50
memberShaun Wilde22-Sep-03 23:50 
GeneralRe: Print & Print Preview with a splitter window Pin
NotBad23-Sep-03 0:01
memberNotBad23-Sep-03 0:01 
Generalhide the split bar Pin
ykuang11-Sep-03 0:26
memberykuang11-Sep-03 0:26 
GeneralRe: hide the split bar Pin
Shaun Wilde11-Sep-03 8:50
memberShaun Wilde11-Sep-03 8:50 
GeneralRe: hide the split bar Pin
qcha0s20-Aug-04 6:27
memberqcha0s20-Aug-04 6:27 
GeneralRe: hide the split bar Pin
Shaun Wilde22-Aug-04 7:19
memberShaun Wilde22-Aug-04 7:19 
GeneralRe: hide the split bar Pin
qcha0s2-Sep-04 9:16
memberqcha0s2-Sep-04 9:16 
GeneralRe: hide the split bar Pin
Shaun Wilde2-Sep-04 10:50
memberShaun Wilde2-Sep-04 10:50 
GeneralRe: hide the split bar Pin
qcha0s3-Sep-04 5:37
memberqcha0s3-Sep-04 5:37 
GeneralThanks so much Pin
Radha Nair2-Jul-03 22:03
memberRadha Nair2-Jul-03 22: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 | Terms of Use | Mobile
Web02 | 2.8.150428.2 | Last Updated 25 Jan 2000
Article Copyright 2000 by Shaun Wilde
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid