Solved

CListView

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

743 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

12 Experts available now in Live!

Get 1:1 Help Now