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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Getting error C2065 and C2057 while complining the application

Getting error C2065 and C2057 while complining the application

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++debuggingworkspace
4 Posts 4 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.
  • D Offline
    D Offline
    Dinu_IP
    wrote on last edited by
    #1

    Hi Friends, Following error is troubling me from last couple of days, I am looking for some help from the group I am doing following steps: 1. Adding a dialog box with ID=IDD_DLG_ORG_IMAGE in the SDI application 2. Adding class using class wizard with class name ‘COrgImgDlg’ derived from ‘CDialog’ for the above created dialog 3. After Compiling a code I am getting following error --------------------Configuration: IP - Win32 Debug-------------------- Compiling... MyTabCtrl.cpp e:\dinesh\ip\orgimgdlg.h(23) : error C2065: 'IDD_DLG_ORG_IMAGE' : undeclared identifier e:\dinesh\ip\orgimgdlg.h(23) : error C2057: expected constant expression Error executing cl.exe. IP.exe - 2 error(s), 0 warning(s) Following is the part of the orgimgdlg.h file where I am getting error class COrgImgDlg : public CDialog { // Construction public: COrgImgDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(COrgImgDlg) enum { IDD = IDD_DLG_ORG_IMAGE }; // CMyTabCtrl m_ImageTabs; //}}AFX_DATA Please help me out I am not understating why this error is occurring in the same header file of the dialog. Thanks and Regards, -Dinesh

    P H D 3 Replies Last reply
    0
    • D Dinu_IP

      Hi Friends, Following error is troubling me from last couple of days, I am looking for some help from the group I am doing following steps: 1. Adding a dialog box with ID=IDD_DLG_ORG_IMAGE in the SDI application 2. Adding class using class wizard with class name ‘COrgImgDlg’ derived from ‘CDialog’ for the above created dialog 3. After Compiling a code I am getting following error --------------------Configuration: IP - Win32 Debug-------------------- Compiling... MyTabCtrl.cpp e:\dinesh\ip\orgimgdlg.h(23) : error C2065: 'IDD_DLG_ORG_IMAGE' : undeclared identifier e:\dinesh\ip\orgimgdlg.h(23) : error C2057: expected constant expression Error executing cl.exe. IP.exe - 2 error(s), 0 warning(s) Following is the part of the orgimgdlg.h file where I am getting error class COrgImgDlg : public CDialog { // Construction public: COrgImgDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(COrgImgDlg) enum { IDD = IDD_DLG_ORG_IMAGE }; // CMyTabCtrl m_ImageTabs; //}}AFX_DATA Please help me out I am not understating why this error is occurring in the same header file of the dialog. Thanks and Regards, -Dinesh

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      Check whether, dilaog you wnat to base class upon is having id IDD_DLG_ORG_IMAGE . And resource.h is included appropriately .

      Prasad Notifier using ATL | Operator new[],delete[][^]

      1 Reply Last reply
      0
      • D Dinu_IP

        Hi Friends, Following error is troubling me from last couple of days, I am looking for some help from the group I am doing following steps: 1. Adding a dialog box with ID=IDD_DLG_ORG_IMAGE in the SDI application 2. Adding class using class wizard with class name ‘COrgImgDlg’ derived from ‘CDialog’ for the above created dialog 3. After Compiling a code I am getting following error --------------------Configuration: IP - Win32 Debug-------------------- Compiling... MyTabCtrl.cpp e:\dinesh\ip\orgimgdlg.h(23) : error C2065: 'IDD_DLG_ORG_IMAGE' : undeclared identifier e:\dinesh\ip\orgimgdlg.h(23) : error C2057: expected constant expression Error executing cl.exe. IP.exe - 2 error(s), 0 warning(s) Following is the part of the orgimgdlg.h file where I am getting error class COrgImgDlg : public CDialog { // Construction public: COrgImgDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(COrgImgDlg) enum { IDD = IDD_DLG_ORG_IMAGE }; // CMyTabCtrl m_ImageTabs; //}}AFX_DATA Please help me out I am not understating why this error is occurring in the same header file of the dialog. Thanks and Regards, -Dinesh

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        Did you include Resource.h


        WhiteSky


        1 Reply Last reply
        0
        • D Dinu_IP

          Hi Friends, Following error is troubling me from last couple of days, I am looking for some help from the group I am doing following steps: 1. Adding a dialog box with ID=IDD_DLG_ORG_IMAGE in the SDI application 2. Adding class using class wizard with class name ‘COrgImgDlg’ derived from ‘CDialog’ for the above created dialog 3. After Compiling a code I am getting following error --------------------Configuration: IP - Win32 Debug-------------------- Compiling... MyTabCtrl.cpp e:\dinesh\ip\orgimgdlg.h(23) : error C2065: 'IDD_DLG_ORG_IMAGE' : undeclared identifier e:\dinesh\ip\orgimgdlg.h(23) : error C2057: expected constant expression Error executing cl.exe. IP.exe - 2 error(s), 0 warning(s) Following is the part of the orgimgdlg.h file where I am getting error class COrgImgDlg : public CDialog { // Construction public: COrgImgDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(COrgImgDlg) enum { IDD = IDD_DLG_ORG_IMAGE }; // CMyTabCtrl m_ImageTabs; //}}AFX_DATA Please help me out I am not understating why this error is occurring in the same header file of the dialog. Thanks and Regards, -Dinesh

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          What #include directives do you have at the top of orgimgdlg.cpp and orgimgdlg.h?


          "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

          "Judge not by the eye but by the heart." - Native American Proverb

          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