Solved

Geting a MDI splitter window to create a tab control

Posted on 2002-03-26
6
453 Views
Last Modified: 2013-11-20
BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
     // TODO: Add your specialized code here and/or call the base class
     // All this **** is to find the pointer to latest CCNCNestDoc
     CMultiDocTemplate *pDocTemplate = THE_APP->m_pCNCNestDocTemplate;
     ASSERT(pDocTemplate);
     POSITION Pos = pDocTemplate->GetFirstDocPosition();
     CCNCNestDoc *pDoc;
     while(pDoc = (CCNCNestDoc*)pDocTemplate->GetNextDoc(Pos))
     {
          if(Pos == NULL) // Final document is reached
               break;
     }
     ASSERT(pDoc);
     m_pDoc = pDoc;

I created a 3 way splitter window with the code below

     CRect arect;
     GetClientRect(&arect);
     CSize size=arect.Size();
     size.cx/=4;
     size.cy/=4;

     
          // Create the splitter window with two rows
     if (!m_wndSplitter.CreateStatic(this, 1, 2))
     {
          TRACE0("Failed to create splitter window\n");
          return FALSE;
     }

     // Left splitter window
     if (!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CCNCNestView),//
          size, pContext))
     {
          m_wndSplitter.DestroyWindow();
          return -1;
     }

     if (!m_wndSplitter2.CreateStatic(&m_wndSplitter, 2, 1,
          WS_CHILD | WS_VISIBLE, m_wndSplitter.IdFromRowCol(0,1)))
     {
          TRACE0("Failed to create splitter window\n");
          return FALSE;
     }
     

     //Top right
     if (!m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CCNCNestView),
          CSize(0, 450), pContext))
     {
          m_wndSplitter.DestroyWindow();
          return -1;
     }

     // Bottom right
     if (!m_wndSplitter2.CreateView(1,0,RUNTIME_CLASS(CJobSettingsView),//CJobSettingsView CNestListView
          CSize(0, 0), pContext))
     {
          m_wndSplitter.DestroyWindow();
          return -1;
     }

     // Set pointers to the two splitter pane frame windows
     m_pTreeFrame = (CFrameWnd*)m_wndSplitter.GetPane(0,0);
     ASSERT(m_pDrawingFrame);
     m_pDrawingFrame= (CFrameWnd*)m_wndSplitter2.GetPane(0,0);
     ASSERT(m_pDetailsFrame);
     m_pDetailsFrame  = (CFrameWnd*)m_wndSplitter2.GetPane(1,0);
     ASSERT(m_pDetailsFrame);

     //more then one windown
     GetParentFrame()->RecalcLayout();

GetParentFrame()->RecalcLayout();

     return TRUE;
     
//  Commented out else splitter is not created
//     return CMDIChildWnd::OnCreateClient(lpcs, pContext);
}

Now I want to create a tab control window in the far left pane (similar to VC++ workspace the tabs will take up the whole pane!!!) that has a tree control on both tabs.  I've been pounding my head and trying to figure this out for a couple of days and I've got nothing.  I have plenty of points that is not a problem, and if I get spoon feed what to do that is fine by me.  

corrently I have a formview in bottom right pane and Now I need to get the right pane working.
0
Comment
Question by:ericcnc
  • 4
  • 2
6 Comments
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 150 total points
ID: 6898387
Try this link

http://www.codeguru.com/docking/mrcext.shtml

i think this is the best suited source code for u...

GOOD LUCK
0
 

Author Comment

by:ericcnc
ID: 6898477
If I split the window in 3, for SOME reason on Gods green earth I CANNOT, ABSOLUTLY CREATE a view to go inside the left side pane . I've tried so many things it's rediculous......................

there has to be a way to do this very easily.........
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 6898482
tried my comment ?

Roshmon
0
ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

 

Author Comment

by:ericcnc
ID: 6901485
I downloaded the library, and I will look at it tomorrow to see If I can get it to work.
0
 

Author Comment

by:ericcnc
ID: 6903315
I have been playing with the library and that is not working.  I just cannot get a window to create or work, I cannot get a view to work...obvously it is me.  BUT, I will keep playing and trying until I get something to work

0
 

Author Comment

by:ericcnc
ID: 6903319
P.S. If any body out there has made a tree control with tabs in the first pane of a 3-way splitter by al means I could use your brain.......!!!!!!!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bigDiff challenge 17 106
unix example issues 18 90
how to use laptop or pad camera in vb.net windows application 2 71
Capture logon name 13 73
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question