Solved

CListView

Posted on 1998-10-18
3
323 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

948 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now