Solved

CListView

Posted on 1998-10-18
3
333 Views
Last Modified: 2008-02-20
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
Comment
Question by:chrisrobinson
3 Comments
 
LVL 3

Expert Comment

by:arnond
ID: 1175411
did you create the new class as a generic class or as an MFC class ?
0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
ID: 1175412
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
 

Author Comment

by:chrisrobinson
ID: 1175413
Thank you - that was excellent.
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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

840 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