Solved

CListView

Posted on 1998-10-18
3
340 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

728 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