|
-
April 10th, 2008, 11:48 AM
#10
Re: Calling cdialog function from a subclassed control
Here are the two include files:
-------------------------------- TabClass.h-------------------------
#pragma once
// CTabClass
class CPropListBoxDlg; <- THIS SHOULD TELL THE COMPILER A CPROPLISTBOXDLG IS ALREADY DEFINED
class CTabClass : public CTabCtrl
{
DECLARE_DYNAMIC(CTabClass)
public:
CTabClass();
virtual ~CTabClass();
protected:
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnTcnSelchange(NMHDR *pNMHDR, LRESULT *pResult);
CPropListBoxDlg m_dlg;
};
----------------------------------------------------------------------
---------------PropListBoxDlg.h ----------------------------------
#if !defined(AFX_PROPLISTBOXDLG_H__B8AE534A_3892_11D4_BC48_00105AA2186F__INCLUDED_)
#define AFX_PROPLISTBOXDLG_H__B8AE534A_3892_11D4_BC48_00105AA2186F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "afxcmn.h"
#include "tabclass.h" <- INCLUDED
/////////////////////////////////////////////////////////////////////////////
// CPropListBoxDlg dialog
class CPropListBoxDlg : public CDialog
{
// Construction
public:
CPropListBoxDlg(CWnd* pParent = NULL); // standard constructor
~CPropListBoxDlg();
// Dialog Data
//{{AFX_DATA(CPropListBoxDlg)
enum { IDD = IDD_PROPLISTBOX_DIALOG };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPropListBoxDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
public:
CTabClass m_tabctrl; <- MEMBER
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PROPLISTBOXDLG_H__B8AE534A_3892_11D4_BC48_00105AA2186F__INCLUDED_)
---------------------------------------------------------------
It is surely an header inclusion error
Additionally I neither can't find a good link to read about this "headerguard" system.. ._.
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
|