CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Adding a new View w/different Base Class

    I have an MDI drawing program with an ImageDrawView class derived from CScrollView. The program was generated by App Wizard. Now I'd like to add another View that's derived from CListView, which I'm calling ImageStatsView; it will display measurements of the drawn lines. I've already added a new document template and resource ID in InitInstance() for the new View, and I used ClassWizard to create the new View class (CListView was chosen as the base class). However, when I try to build the program, I get error messages from the ImageStatsView.h and .cpp files saying that "CListView" is undefined. Am I supposed to "define" CListView somewhere outside of these files? When I change the base class of the new View to CScrollView, the program builds fine.
    Maybe MFC can't handle multiple Views derived from different base classes?


  2. #2
    Join Date
    Apr 1999
    Posts
    383

    Re: Adding a new View w/different Base Class

    Make sure you include the CListView header, afxcview.h, either in your ImageStatsView header file, or in your ImageStatsView.cpp file, or put it into stdafx.h.

    ClassWizard assumes it will be in stdafx.h, but it isn't...

    Dave


  3. #3
    Guest

    Re: Adding a new View w/different Base Class

    I am trying to write an MDI application with the same type of class problems. Please email me at [email protected] if you would like to trade thoughts and ideas. Thanks.

    Terry.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured