Solved

MDI Application with splitter

Posted on 1997-11-25
3
310 Views
Last Modified: 2008-03-06
I wanted to create an MDI Application with a splitter in the MDI Child Windows and place controls in the 2 splitted regions. After looking at the ViewEx sample program of MS VC++ 5, I think that I know how to do it. But when I write it, I get errors:

BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
      if (!m_wndSplitter.CreateStatic(this, 1, 2))
            return FALSE;
      if (!m_wndSplitter.CreateView(0, 0,
            pContext->m_pNewViewClass, CSize(100, 100), pContext))
            return FALSE;
      if (!m_wndSplitter.CreateView(0, 1,
            RUNTIME_CLASS(CSourcePiecesView), CSize(0, 0), pContext))
//error C2653: 'CSourcePiecesView' : is not a class or namespace name
//error C2065: 'classCSourcePiecesView' : undeclared identifier
//Note:the base class of 'CSourcePiecesView' is FormView.
            return FALSE;
      SetActiveView((CView*)m_wndSplitter.GetPane(0,1));

      return TRUE;
      
//      return CMDIChildWnd::OnCreateClient(lpcs, pContext);
}

After comparing my code and the code of ViewEx, I still don't know why. Is there any one who can help me?
0
Comment
Question by:sccheung
[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
3 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 20 total points
ID: 1174064
Have you checked to make sure your source file #includes the header file which declares CSourcePiecesView?


0
 

Author Comment

by:sccheung
ID: 1174065
Oh! Really caused by such a ridiculous mistake? How careless I am. I'll try to see if your answer works. Please wait a minute.
0
 

Author Comment

by:sccheung
ID: 1174066
Oh! You are right. I use Delphi originally. Delphi will ask me to confirm if I wan to add it into the "uses list" instead of saying what is CSourcePiecesView. Microsoft wasted me 25 points!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
convert char array to number in c 5 91
Header of docx file 17 132
How to print into std::string like sprintf using C++11? 12 121
C++ help/ Toy problem 19 55
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

733 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