Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Multiple View

Multiple View

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestionlearning
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ROK_RShadow
    wrote on last edited by
    #1

    sigh.. ok.. another problem I don't seem to understand.. sorry.. I'm a little new to MFC and Win Programming.. Ok.. I'm trying to follow along in this book "Microsoft Visual C++ Fith Edition" to create multiple views Now the example from the book (Ex20c) compiles and works fine.. but when I try to re-create it.. I get 3 errors when I compile error C2143: syntax error : missing ';' before '*' error C2501: 'CMVSampleDoc' : missing storage-class or type specifiers error C2501: 'GetDocument' : missing storage-class or type specifiers I get these errors when I add the View Header files to the MainFrame implementation file (CMainFrm.cpp) I can not for the life of me figure out why I am getting these error messages.. The first error message relates to the GetDocument() function in the view. I tried two different ways.. first I used ClassWizard to create a new class derived from CView.. and I got these errors.. so I did it exactly the way the book did it.. and just copied the .h and .cpp file to new names, and modified them with different names.. thinking that maybe because the second view was avalible from ClassWizard that funked something up.. but I still receive the errors. Any Ideas?

    R 1 Reply Last reply
    0
    • R ROK_RShadow

      sigh.. ok.. another problem I don't seem to understand.. sorry.. I'm a little new to MFC and Win Programming.. Ok.. I'm trying to follow along in this book "Microsoft Visual C++ Fith Edition" to create multiple views Now the example from the book (Ex20c) compiles and works fine.. but when I try to re-create it.. I get 3 errors when I compile error C2143: syntax error : missing ';' before '*' error C2501: 'CMVSampleDoc' : missing storage-class or type specifiers error C2501: 'GetDocument' : missing storage-class or type specifiers I get these errors when I add the View Header files to the MainFrame implementation file (CMainFrm.cpp) I can not for the life of me figure out why I am getting these error messages.. The first error message relates to the GetDocument() function in the view. I tried two different ways.. first I used ClassWizard to create a new class derived from CView.. and I got these errors.. so I did it exactly the way the book did it.. and just copied the .h and .cpp file to new names, and modified them with different names.. thinking that maybe because the second view was avalible from ClassWizard that funked something up.. but I still receive the errors. Any Ideas?

      R Offline
      R Offline
      ROK_RShadow
      wrote on last edited by
      #2

      wtf ?!? It appears that I only get errors when I try to have a View derived from CListView.. I successfully got the code to work with two CViews.. and a CView and CHTMLView.

      M 1 Reply Last reply
      0
      • R ROK_RShadow

        wtf ?!? It appears that I only get errors when I try to have a View derived from CListView.. I successfully got the code to work with two CViews.. and a CView and CHTMLView.

        M Offline
        M Offline
        MAAK
        wrote on last edited by
        #3

        Try to include the document class header in the view header. I got a similar problem before and solved it that way.

        //YourView.h
        
        #include "MVSampleDoc.h"
        .
        .
        .
        
        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups