Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

CListView

I am writing an SDI .exe in W98 using VC++ 5.0.  I want to display a List Control in Report mode with several columns, the size of the main window, with menus.

Using the class wizard, I derived a CMyListView class from the CListView base class, which produced the relevant .h & .cpp files.  The build produced Error C2504: Base class undefined!
0
chrisrobinson
Asked:
chrisrobinson
1 Solution
 
arnondCommented:
did you create the new class as a generic class or as an MFC class ?
0
 
Answers2000Commented:
You need to include the relevant header in your stdafx.h

Make sure you include afxcmn.h and afxcview.h

Here is the relevant section form my stdafx.h

#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxole.h>         // MFC OLE classes
#include <afxodlgs.h>       // MFC OLE dialog classes
#include <afxdisp.h>        // MFC OLE automation classes
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>                  // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <afxcview.h>
#include <afxtempl.h>

You can omit the OLE lines if you are not using OLE

You can omit the afxtempl.h line if you are not using CList, CMap or CArray




0
 
chrisrobinsonAuthor Commented:
Thank you - that was excellent.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now