[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Splitter View With One Pane Showing CFormView

Posted on 2002-07-04
2
Medium Priority
?
456 Views
Last Modified: 2008-03-17
Hi,
I'm trying to create a splitter with a SDI architecture and with one side of the pane showing the main document and then another pane showing a CFormView object. Is that possible ?If so, how do i do it ? any sample ?
Thanks a lot.
0
Comment
Question by:Hsiang2k
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 7129637
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 1400 total points
ID: 7129670
If you use the AppWizard to create an SDI, near the end you can choose Explorer Style which provides a splitter and creates two views for you.  You can then create your own views and just modify the part in MyApp.cpp where you see:

     CSingleDocTemplate* pDocTemplate;
     pDocTemplate = new CSingleDocTemplate(
          IDR_MAINFRAME,
          RUNTIME_CLASS(CMyDoc),
          RUNTIME_CLASS(CMainFrame),       // main SDI frame window
          RUNTIME_CLASS(CLeftView));
     AddDocTemplate(pDocTemplate);

so that it uses to setup your views.  Also modify the place in CMainFraem where it creates the views.  It looks like this:

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
     CCreateContext* pContext)
{
     // create splitter window
     if (!m_wndSplitter.CreateStatic(this, 1, 2))
          return FALSE;

     if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(100, 100), pContext) ||
          !m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CRightView), CSize(100, 100), pContext))
     {
          m_wndSplitter.DestroyWindow();
          return FALSE;
     }

     return TRUE;
}

Change it to use your own views.

-- Dan
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

656 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