CSplitterWnd inside a CSplitterWnd?

CSplitterWnd inside a CSplitterWnd?

Post by Tina Mari » Tue, 05 Nov 1996 04:00:00



I need to create a splitter window with 3 panes - 1 down
the left side, and two on the right.  I know I need to
create two seperate CSplitterWnds, one inside the other.
I'm at a loss how to do this.  When I try to use AddView
with a class of CSplitterWnd, it complains that it can't
be dynamically created.

I know it has been done, because I've seen other questions
on it here, but how?

E-mail is appreciated.

Tina Marie

 
 
 

CSplitterWnd inside a CSplitterWnd?

Post by Morris Maynar » Tue, 05 Nov 1996 04:00:00


The following is done in OnCreateClient:
1: Create a Splitter with 1 row and two columns

  paneID = AFX_IDW_PANE_FIRST;
  m_SplitLeft.CreateStatic(this, 1, 2, dwStyle, paneID);

2: In column 1 (the right-most column) create another splitter with 1
column
   and 2 rows

  paneID = m_SplitLeft.IdFromRowCol(0, 1);
  m_SplitRight.CreateStatic(&m_SplitLeft, 2, 1, dwStyle, paneID);

3: now in each pane create a view:

  m_wndLeft.CreateView(0, 0, RUNTIME_CLASS(CViewLeft), CSize(vlcx,
vlcy), pContext);
  m_wndRight.CreateView(0, 0, RUNTIME_CLASS(CViewRightTop), CSize(vrcx,
vrcy), pContext);
  m_wndRight.CreateView(1, 0, RUNTIME_CLASS(CViewRightBot), CSize(vrcx,
vrcy), pContext);

4: Add in two dozen other details, like checking the return values on
the above functions,
   setting the row and column sizes, calling RecalcLayout, etc. etc.

Good luck!
(My sitemanager broke the ability of Netscape to send Email from our
site.)


> I need to create a splitter window with 3 panes - 1 down
> the left side, and two on the right.  I know I need to
> create two seperate CSplitterWnds, one inside the other.
> I'm at a loss how to do this.  When I try to use AddView
> with a class of CSplitterWnd, it complains that it can't
> be dynamically created.

> I know it has been done, because I've seen other questions
> on it here, but how?


 
 
 

1. CSplitterWnd in a CSplitterWnd pane?

I would like to create an application which divides the main frame into
two views.  I plan on using a CSplitterWnd for this.  I would then like
to place another CSplitterWnd inside the right hand pane of the first
splitter window.  Is this possible?

Thanks

-- Bennett

--
Bennett Smith                   SSGI
Senior Software Engineer        1370 Ridgewood Drive, Suite 20

voice: (916) 898-0662           fax: (916) 342-8966

2. Starlancer

3. how to switch formviews inside CSplitterWnd?

4. Using MCI in a service,possible ?

5. CWnd's inside of CSplitterWnd's

6. Language Encoding in OE6 Help Menu links

7. problems with CSplitterWnd

8. Backup to Zip

9. CSplitterWnd without Borders

10. CSplitterWnd always redraws completely :-(

11. CSplitterWnd with 2 CListCtrl's

12. RichEditView + CSplitterWnd

13. CSplitterWnd questions