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. Dialog problem

Dialog problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
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.
  • S Offline
    S Offline
    Selevercin
    wrote on last edited by
    #1

    I've created a dialog with nothing special in it. I don't know why, but I continue to get the following errors: error C2065: 'IDD_SORU' : undeclared identifier error C2057: expected constant expression All for the following line of code, which I did not write:

    / Dialog Data
    	//{{AFX_DATA(CSoruDlg)
    	enum { IDD = IDD_SORU };
    		// NOTE: the ClassWizard will add data members here
    	//}}AFX_DATA
    

    I have rebuilt everything, even deleted the dialog and remade it. Any ideas? If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.

    L 1 Reply Last reply
    0
    • S Selevercin

      I've created a dialog with nothing special in it. I don't know why, but I continue to get the following errors: error C2065: 'IDD_SORU' : undeclared identifier error C2057: expected constant expression All for the following line of code, which I did not write:

      / Dialog Data
      	//{{AFX_DATA(CSoruDlg)
      	enum { IDD = IDD_SORU };
      		// NOTE: the ClassWizard will add data members here
      	//}}AFX_DATA
      

      I have rebuilt everything, even deleted the dialog and remade it. Any ideas? If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Looks like IDD_SORU is not declared. This should be in your resource header file, its probably called resource.h Visula Studio should have added a #define tot his file for IDD_CORU when you created the dialog. Its not unusual for Visual Studio to get confused with these things. Open your resource.h file At the bottom there is a line like the following #define _APS_NEXT_RESOURCE_VALUE 348 Add a #define for IDD_SORU to the resource.h file use the number from the _APS_NEXT_RESOURCE_VALUE line and increment _APS_NEXT_RESOURCE_VALUE so in this example you would add the following line #define IDD_SORU 348 and modify this line #define _APS_NEXT_RESOURCE_VALUE 349 Hope that helps

      S 1 Reply Last reply
      0
      • L Lost User

        Looks like IDD_SORU is not declared. This should be in your resource header file, its probably called resource.h Visula Studio should have added a #define tot his file for IDD_CORU when you created the dialog. Its not unusual for Visual Studio to get confused with these things. Open your resource.h file At the bottom there is a line like the following #define _APS_NEXT_RESOURCE_VALUE 348 Add a #define for IDD_SORU to the resource.h file use the number from the _APS_NEXT_RESOURCE_VALUE line and increment _APS_NEXT_RESOURCE_VALUE so in this example you would add the following line #define IDD_SORU 348 and modify this line #define _APS_NEXT_RESOURCE_VALUE 349 Hope that helps

        S Offline
        S Offline
        Selevercin
        wrote on last edited by
        #3

        Thanks for the help! It seems that it is already defined in the resource.h file. It is defined as 132 and the _APS_NEXT_RESOURCE_VALUE is defined as 133. Should I simply delete the entire dialog and try again? If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.

        L 1 Reply Last reply
        0
        • S Selevercin

          Thanks for the help! It seems that it is already defined in the resource.h file. It is defined as 132 and the _APS_NEXT_RESOURCE_VALUE is defined as 133. Should I simply delete the entire dialog and try again? If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          That will probably work. It could be a problem with the pre-compiled headers. Try a rebuild all. Also check that the resource.h is included in the dialog header 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