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?
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
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.