Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Visual studio 2010 compile error - I don't understand how to fix it

Visual studio 2010 compile error - I don't understand how to fix it

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpc++visual-studiodebugging
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 10924543
    wrote on last edited by
    #1

    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:

    J 1 Reply Last reply
    0
    • U User 10924543

      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:

      J Offline
      J Offline
      Jochen Arndt
      wrote on last edited by
      #2

      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.

      U 2 Replies Last reply
      0
      • J Jochen Arndt

        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.

        U Offline
        U Offline
        User 10924543
        wrote on last edited by
        #3

        It turned out that I was looking in the wrong file. The problem as the App definition file not the dialog definition file.

        1 Reply Last reply
        0
        • J Jochen Arndt

          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.

          U Offline
          U Offline
          User 10924543
          wrote on last edited by
          #4

          It turned out that I was looking in the wrong file. The problem as the App definition file not the dialog defionition file.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups