Different Views In Dynamic Splitter
Posted
by Mahendra Bhagat
on February 8th, 1999
In class definition of CSplitterWnd, there is a protected member m_pDynamicViewClass of the type CRunTimeClass *. This member is initialized in the Create call of the splitter window. Next time when a view is created, new view is constructed using m_pDynamicViewClass member. To get a different view, you will just have to change the member m_pDynamicViewClass to the required new view. Since this member is a protected member, to change it I have derived my class 'CDynSplitter' from class CSplitterWnd. I have just added a function to change member m_pDynamicViewClass.
class CDynSplitter : public CSplitterWnd
{
public:
CDynSplitter() ;
virtual ~CDynSplitter() ;
void ChangeViewClass( CRuntimeClass *pNewView )
{
m_pDynamicViewClass = pNewView ;
}
// Other overridden functions ...
};
You call this function and pass a CRuntimeClass pointer of new view. I have given a sample application, in which there are two views, one is a form view and another is a list view. In that I am just calling the same function so that the new view will be created of different type. I have also overridden a function DeleteView(int row, int col); to change m_pDynamicViewClass pointer to the view to be deleted, so that next time the deleted view will be created again.
Download demo project - 164 KB
Date Last Updated: February 8, 1999

Comments
Upcoming nike Publication Unwraps The Best Ways To Rule The nike Marketplace
Posted by icoppyapedcap on 05/01/2013 03:18pmLhgSdfUiaGan [url=http://www.nikeyasuijp.com/]ãã¤ãã¹ãã¼ã«ã¼[/url]VtrZniIziVdm [url=http://www.nikeyasuijp.com/nike-air-force1ã¨ã¢ãã©ã¼ã¹1-c-14.html]ãã¤ã ããª[/url]WliGhhMiiIni [url=http://www.nikeyasuijp.com/nike-air-maxã¨ã¢ããã¯ã¹-c-12.html]ãã¤ãã©ã³ãã³ã°[/url]MgpVmnEamBjc [url=http://www.nikeyasuijp.com/nike-air-jordanã¨ã¢-ã¸ã§ã¼ãã³-c-13.html]nike air jordan[/url]EnrBwfNcpBxl
ReplyThings everyone else does with regard to nike and furthermore something that youwant to do different.
Posted by icoppyapedcap on 04/21/2013 02:54pmSrxBmqLquBdf[url=http://www.guccisayihujp.biz/]ã°ãã 財å¸[/url]TlpHinRyfSec [url=http://www.guccisayihujp.biz/ãã°ãããã¬ãã£ã¼ã¹è²¡å¸-c-5.html]ã°ããããã¼ã±ã¼ã¹[/url]CvlZpoHncUap [url=http://www.guccisayihujp.biz/ãã°ãããã¬ãã£ã¼ã¹é·è²¡å¸-c-6.html]ã°ãã è²¡å¸ æ°ä½[/url]KoaKriKxjLbt [url=http://www.guccisayihujp.biz/ãã°ãããã·ã§ã«ãã¼ããã°-c-2.html]gucci ã¢ã¦ãã¬ãã[/url]GtuQhiVerFrm FieRocQesEws [url=http://www.adidasgekiyasu.biz/]adidas originals[/url]UikJqzRfcAlt [url=http://www.nikegekiyasu.biz/]nike[/url]ZorDusWvwNgo PxvKmpVllSii [url=http://www.chanelsayihujp.biz/]ã·ã£ãã«[/url] GtwUpmDoyEdl [url=http://www.chanelsayihujp.biz/ã·ã£ãã«è²¡å¸-c-9.html]ã·ã£ãã« ãã§ã¼ã³ã¦ã©ã¬ãã[/url]HjqEhzOrdYac [url=http://www.chanelsayihujp.biz/ã·ã£ãã«-ã·ã§ã«ãã¼ããã°-c-1.html]chanel bag[/url]IlsXevEkySkb IcmFdgTthMgx [url=http://www.chloesayihujp.biz/]ã¯ã㨠財å¸[/url] KaeRutNegYok [url=http://www.chloesayihujp.biz/ã¯ãã¨-é·è²¡å¸-c-3.html]ã¯ã㨠é·è²¡å¸[/url] JcaRvwClfGix [url=http://www.chloesayihujp.biz/ã¯ãã¨-ãã³ãããã°-c-2.html]chloe ããã°[/url] YjoRzmSmbAbv
Replysplitters with form views
Posted by Legacy on 03/31/2003 12:00amOriginally posted by: hylepark
i would like to create a splitter similar to the one you have here but not from the MainFrame object where one view is a FormView and the other is a normal CView. Any suggestions? THanks.
ReplyDynamic Splitter
Posted by Legacy on 12/20/2000 12:00amOriginally posted by: rajeev mc
How can we have multiple views in the same pane.pls help
ReplyHow to keep Splitter Postion same when user changes size of the Window
Posted by Legacy on 11/19/2000 12:00amOriginally posted by: jay reddy
ReplyPrinting problem
Posted by Legacy on 08/11/1999 12:00amOriginally posted by: Vicky
Hi
I have created a dynamic splitter(as shown in your article in Codeguru) having two different classes - CScrollView and CTreeView. I created view class as CScrollView using the AppWizard. Then I derived a class from CTreeView and added to create a splitter with these two classes.
The problem I am facing is that when I click on the tree and open File menu, Print & Print Preview options are disabled. But when I click in the CScrollView and open File menu, Print & Print Preview options are enabled.
Why this is happening?
Thanx in advance
Vicky
Reply2 views in the same splitter pane
Posted by Legacy on 07/26/1999 12:00amOriginally posted by: Deelip Menezes
I want to have two views in the same splitter pane.
ReplyThese views should be able to be swapped on the menu selection. Can you help?
MDIChildWnd in a pane ?
Posted by Legacy on 06/01/1999 12:00amOriginally posted by: Laurent BERNARD
And do you if it's possible to use a multi doc in a pane like in the editor of visual ?
ReplyAssertion erros with CScrollView
Posted by Legacy on 03/12/1999 12:00amOriginally posted by: Steven Brekelmans
ReplyWhen trying to use a splitter, one pain a CEditView the other a CScrollView, I'm getting a debug asserting error if I use the intellimouse scrolly wheel to scroll in the CScrollView window. Any ideas?
How to keep a pane always be a square?
Posted by Legacy on 02/25/1999 12:00amOriginally posted by: zhang zhongyong
Dear All experts on splitterWnd,
I would like to know a simple method to realize my following idea:
1. Split a window into two column; (that's easy)
Reply2. Keep the first pane always be a square automatically when users
change the size of the window; (difficult, I cant implement)
In my App, when changing the size of the window, I have to drag
the splitter bar to keep the first pane being a square.