Visual studio 2010 compile error - I don't understand how to fix it
-
Error 1 error C2504: 'CMyDialog' : base class undefined c:\greg\easywebstoreuploader\easywebstoreuploaderdlg.h 9
In the source file I have included the MyDialog.h above the header file containing the class definition for CEasyWebStoreUploaderDlg but I can't pi$$ this compiler error off and I don't understand why. Can any one help me?
#include "stdafx.h";
#include "INI.h"
#include #include #include "MyDialog.h"
//#include "ServerDialog.h"
//#include "ImageDialog.h"
#include "EasyWebStoreUploaderDlg.h"
#include "EasyWebStoreUploader.h"Header file
/ EasyWebStoreUploaderDlg.h : header file
//#pragma once
// CEasyWebStoreUploaderDlg dialog
class CEasyWebStoreUploaderDlg : public CMyDialog
{
// Construction
public:
CEasyWebStoreUploaderDlg(CWnd* pParent = NULL); // standard constructor
~CEasyWebStoreUploaderDlg();// Dialog Data enum { IDD = IDD\_EASYWEBSTOREUPLOADER\_DIALOG }; protected: virtual void DoDataExchange(CDataExchange\* pDX); // DDX/DDV support // Implementation protected: HICON m\_hIcon; //CServerDialog m\_dialogServer; // Generated message map functions virtual BOOL OnInitDialog(); afx\_msg void OnSysCommand(UINT nID, LPARAM lParam); afx\_msg void OnPaint(); afx\_msg HCURSOR OnQueryDragIcon(); DECLARE\_MESSAGE\_MAP() public: afx\_msg void OnClickConnect(); afx\_msg void OnClickUploadAll(); afx\_msg void OnChangeTab(NMHDR \*pNMHDR, LRESULT \*pResult); CTabCtrl m\_tabCtrl;
};
Source file
// EasyWebStoreUploaderDlg.cpp : implementation file
//#include "stdafx.h"
#include "INI.h"
#include
#include "afxcmn.h"
#include "MyDialog.h"
//#include "ServerDialog.h"
//#include "ImageDialog.h"
#include "EasyWebStoreUploaderDlg.h"
#include "EasyWebStoreUploader.h"#ifdef _DEBUG
#define new DEBUG_NEW
#endif// CAboutDlg dialog used for App About
class CAboutDlg : public CDialogEx
{
public:
CAboutDlg();// Dialog Data enum { IDD = IDD\_ABOUTBOX }; protected: virtual void DoDataExchange(CDataExchange\* pDX); // DDX/DDV support // Implementation protected: DECLARE\_MESSAGE\_MAP()
};
CAboutDlg::CAboutDlg() : CDialogEx(CAboutDlg::IDD)
{
}void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
END_MESSAGE_MAP()// CEasyWebStoreUploaderDlg dialog
CEasyWebStoreUploaderDlg:
-
Error 1 error C2504: 'CMyDialog' : base class undefined c:\greg\easywebstoreuploader\easywebstoreuploaderdlg.h 9
In the source file I have included the MyDialog.h above the header file containing the class definition for CEasyWebStoreUploaderDlg but I can't pi$$ this compiler error off and I don't understand why. Can any one help me?
#include "stdafx.h";
#include "INI.h"
#include #include #include "MyDialog.h"
//#include "ServerDialog.h"
//#include "ImageDialog.h"
#include "EasyWebStoreUploaderDlg.h"
#include "EasyWebStoreUploader.h"Header file
/ EasyWebStoreUploaderDlg.h : header file
//#pragma once
// CEasyWebStoreUploaderDlg dialog
class CEasyWebStoreUploaderDlg : public CMyDialog
{
// Construction
public:
CEasyWebStoreUploaderDlg(CWnd* pParent = NULL); // standard constructor
~CEasyWebStoreUploaderDlg();// Dialog Data enum { IDD = IDD\_EASYWEBSTOREUPLOADER\_DIALOG }; protected: virtual void DoDataExchange(CDataExchange\* pDX); // DDX/DDV support // Implementation protected: HICON m\_hIcon; //CServerDialog m\_dialogServer; // Generated message map functions virtual BOOL OnInitDialog(); afx\_msg void OnSysCommand(UINT nID, LPARAM lParam); afx\_msg void OnPaint(); afx\_msg HCURSOR OnQueryDragIcon(); DECLARE\_MESSAGE\_MAP() public: afx\_msg void OnClickConnect(); afx\_msg void OnClickUploadAll(); afx\_msg void OnChangeTab(NMHDR \*pNMHDR, LRESULT \*pResult); CTabCtrl m\_tabCtrl;
};
Source file
// EasyWebStoreUploaderDlg.cpp : implementation file
//#include "stdafx.h"
#include "INI.h"
#include
#include "afxcmn.h"
#include "MyDialog.h"
//#include "ServerDialog.h"
//#include "ImageDialog.h"
#include "EasyWebStoreUploaderDlg.h"
#include "EasyWebStoreUploader.h"#ifdef _DEBUG
#define new DEBUG_NEW
#endif// CAboutDlg dialog used for App About
class CAboutDlg : public CDialogEx
{
public:
CAboutDlg();// Dialog Data enum { IDD = IDD\_ABOUTBOX }; protected: virtual void DoDataExchange(CDataExchange\* pDX); // DDX/DDV support // Implementation protected: DECLARE\_MESSAGE\_MAP()
};
CAboutDlg::CAboutDlg() : CDialogEx(CAboutDlg::IDD)
{
}void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
END_MESSAGE_MAP()// CEasyWebStoreUploaderDlg dialog
CEasyWebStoreUploaderDlg:
You should include MyDialog.h in EasyWebStoreUploaderDlg.h and not in the source file. If you than still get the error, check the definition of
CMyDialog
in MyDialog.h. -
You should include MyDialog.h in EasyWebStoreUploaderDlg.h and not in the source file. If you than still get the error, check the definition of
CMyDialog
in MyDialog.h.It turned out that I was looking in the wrong file. The problem as the App definition file not the dialog definition file.
-
You should include MyDialog.h in EasyWebStoreUploaderDlg.h and not in the source file. If you than still get the error, check the definition of
CMyDialog
in MyDialog.h.It turned out that I was looking in the wrong file. The problem as the App definition file not the dialog defionition file.