Click here to Skip to main content
15,920,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: DAAAHH! What does this error message means? Pin
Rick York16-Nov-01 18:50
mveRick York16-Nov-01 18:50 
GeneralProperty Pages question Pin
RobJones15-Nov-01 9:03
RobJones15-Nov-01 9:03 
GeneralRe: Property Pages question Pin
Bill Wilson15-Nov-01 12:30
Bill Wilson15-Nov-01 12:30 
GeneralRe: Property Pages question Pin
RobJones16-Nov-01 3:18
RobJones16-Nov-01 3:18 
GeneralRe: Property Pages question Pin
Frank Deo16-Nov-01 3:48
Frank Deo16-Nov-01 3:48 
GeneralRe: Property Pages question Pin
Bill Wilson16-Nov-01 7:15
Bill Wilson16-Nov-01 7:15 
GeneralRe: Property Pages question Pin
RobJones16-Nov-01 11:12
RobJones16-Nov-01 11:12 
GeneralRe: Property Pages question Pin
RobJones16-Nov-01 11:52
RobJones16-Nov-01 11:52 
All of my wizard pages are derived from the CNewWizPage class so if I try to add a member variable ( Public: CItemDlg m_dItemDlg) inside of my CNewWizPage or CNewWizDialog class it errors... Maybe I should scrap the custom class and derive my own class from CPropertySheet instead.. This is the class I'm using "http://www.codeproject.com/dialog/wizard2000.asp" I dont know if you have tried it..

Just incase im doing something dumb here is what I did.. maybe I'm over looking something..

#if !defined(AFX_NEWWIZDIALOG_H__915D4C89_2E27_11D4_9FA9_0030DB0011C6__INCLUDED_)
#define AFX_NEWWIZDIALOG_H__915D4C89_2E27_11D4_9FA9_0030DB0011C6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// NewWizDialog.h : header file
//

#include "ItemDlg.h"
class CNewWizPage;

/////////////////////////////////////////////////////////////////////////////
// CNewWizDialog dialog

class CNewWizDialog : public CDialog
{
// Construction
public:
	CNewWizDialog (LPCTSTR lpszTemplate, CWnd* pParent = NULL);
	CNewWizDialog (UINT nIDTemplate, CWnd* pParent = NULL);
	virtual ~CNewWizDialog ();


// Attributes
public:


protected:
	CObList m_PageList; // this list of CNewWizPage objects
	UINT m_nPlaceholderID; // control ID for the palceholder


// Operations
public:
	CItemDlg m_dItemDlg;
	void AddPage(CNewWizPage* pPage, UINT nID);
	void SetActivePageByResource(UINT nResourceID);
	BOOL SetFirstPage();
	void SetNextPage();
	void EnableFinish(BOOL bEnable);
	void EnableBack(BOOL bEnable);
	void EnableNext(BOOL bEnable);
	int GetActiveIndex() const;
	int GetPageIndex(CNewWizPage* pPage) const;
	int GetPageCount();
	CNewWizPage* GetPage(int nPage) const;
	BOOL SetActivePage(int nPage);
	BOOL SetActivePage(CNewWizPage* pPage);
	void SetTitle(LPCTSTR lpszText);
	void SetTitle(UINT nIDText);
	void SetFinishText(LPCTSTR lpszText);
	void SetFinishText(UINT nIDText);

protected:
	BOOL ActivatePage(CNewWizPage* pPage);
	BOOL DeactivatePage();
	void SetPlaceholderID(int nPlaceholderID);
	CNewWizPage* GetPageByResourceID(UINT nResourceID);


private:
	void Init();
	BOOL DestroyPage(CNewWizPage* pPage);
	CNewWizPage* GetFirstPage();
	CNewWizPage* GetLastPage();
	CNewWizPage* GetActivePage() const;
	CNewWizPage* GetNextPage();


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNewWizDialog)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CNewWizDialog)
	afx_msg void OnDestroy();
	afx_msg void OnWizardFinish();
	afx_msg void OnWizardBack(); 
	afx_msg void OnWizardNext(); 
	afx_msg void OnCancel(); 
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_NEWWIZDIALOG_H__915D4C89_2E27_11D4_9FA9_0030DB0011C6__INCLUDED_)


Heres where it errors with an error of "e:\Wizard\itemdlg.h(22) : error C2065: 'IDD_ITEM' : undeclared identifier
e:\Wizard\itemdlg.h(22) : error C2057: expected constant expression"

class CItemDlg : public CNewWizPage
{
// Construction
public:
	CItemDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CItemDlg)
	enum { IDD = IDD_ITEM };  <-- HERE 
	CString	m_strPassword;
	CString	m_strVpassword;
	CString	m_strItem;
	CString	m_strName;
	//}}AFX_DATA


// Overrides


Any ideas?

Rob
GeneralRe: Property Pages question Pin
Bill Wilson16-Nov-01 13:12
Bill Wilson16-Nov-01 13:12 
GeneralRe: Property Pages question Pin
RobJones16-Nov-01 13:15
RobJones16-Nov-01 13:15 
GeneralRAS events Pin
15-Nov-01 4:24
suss15-Nov-01 4:24 
GeneralRe: RAS events Pin
Masaaki Onishi15-Nov-01 17:07
Masaaki Onishi15-Nov-01 17:07 
GeneralOwner drawn button with drop-down menu Pin
Derek Lakin15-Nov-01 3:35
Derek Lakin15-Nov-01 3:35 
QuestionWhen to delete, and when to NULL? Pin
Chambers15-Nov-01 3:33
Chambers15-Nov-01 3:33 
AnswerRe: When to delete, and when to NULL? Pin
Nish Nishant15-Nov-01 3:50
sitebuilderNish Nishant15-Nov-01 3:50 
AnswerRe: When to delete, and when to NULL? Pin
Jon Sagara15-Nov-01 4:53
Jon Sagara15-Nov-01 4:53 
GeneralRe: When to delete, and when to NULL? Pin
Ray Kinsella15-Nov-01 6:02
Ray Kinsella15-Nov-01 6:02 
GeneralRe: When to delete, and when to NULL? Pin
Jon Sagara15-Nov-01 6:46
Jon Sagara15-Nov-01 6:46 
GeneralRe: When to delete, and when to NULL? Pin
Jim A. Johnson15-Nov-01 6:08
Jim A. Johnson15-Nov-01 6:08 
GeneralRe: When to delete, and when to NULL? Pin
Jon Sagara15-Nov-01 6:50
Jon Sagara15-Nov-01 6:50 
GeneralRe: When to delete, and when to NULL? Pin
Michael Dunn15-Nov-01 9:11
sitebuilderMichael Dunn15-Nov-01 9:11 
GeneralRe: When to delete, and when to NULL? Pin
Jon Sagara15-Nov-01 10:58
Jon Sagara15-Nov-01 10:58 
GeneralRe: When to delete, and when to NULL? Pin
Jim A. Johnson15-Nov-01 12:15
Jim A. Johnson15-Nov-01 12:15 
GeneralRe: When to delete, and when to NULL? Pin
Jon Sagara15-Nov-01 12:36
Jon Sagara15-Nov-01 12:36 
GeneralRe: When to delete, and when to NULL? Pin
Tim Smith15-Nov-01 12:54
Tim Smith15-Nov-01 12:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.