|
-
April 29th, 2008, 04:55 PM
#1
MFC ListCtrl Declaration, Help!
Ok, this is probably something simple, but I cannot get it to work.
project_main_header.h
Code:
#include <afxwin.h>
#ifndef _DIALOGASMAINWINDOW_H_
#define _DIALOGASMAINWINDOW_H_
class CMyApp : public CWinApp
{
public:
virtual BOOL InitInstance();
};
class CMainDialog : public CDialog
{
public:
CMainDialog();
void OnDialogExit();
protected:
virtual BOOL OnInitDialog();
virtual void PostNcDestroy();
afx_msg void OnPaint();
DECLARE_MESSAGE_MAP()
private:
CListCtrl *pListCtrl;
};
#endif
I'm having errors on the line I bolded. I need to declare a CListCtrl type variable. How do I accomplish this?
[Edit]
I should've been more specific with the error. The actual error spitted out from Visual Studio 2007 is
c:\ee4970_huh\ee4970_project\ee4970_project\project_main_header.h(27) : error C2143: syntax error : missing ';' before '*'
c:\ee4970_huh\ee4970_project\ee4970_project\project_main_header.h(27) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\ee4970_huh\ee4970_project\ee4970_project\project_main_header.h(27) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Which is ofcanother way of saying that CListCtrl class does not exist, when in FACT it does.
If I were to declare CListBox for example, this code would work perfectly but not CListCtrl.
Last edited by l46kok; April 29th, 2008 at 05:45 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|