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. compiler not recognizing dialog ID

compiler not recognizing dialog ID

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestionlearning
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.
  • J Offline
    J Offline
    Jake Palmer
    wrote on last edited by
    #1

    Any ideas why the compiler is telling me it doesn't recognize the ID of the dialog that VC++ just created? I mean, I just made the resource for "IDD_DIALOG1", then created a new class for it, and when I try to build that class has an error in the generated .h file, at the line: enum { IDD = IDD_DIALOG1 } saying the ID is an undeclared identifier. that's lame. any ideas how to get rid of this? thanks, Jake

    C 1 Reply Last reply
    0
    • J Jake Palmer

      Any ideas why the compiler is telling me it doesn't recognize the ID of the dialog that VC++ just created? I mean, I just made the resource for "IDD_DIALOG1", then created a new class for it, and when I try to build that class has an error in the generated .h file, at the line: enum { IDD = IDD_DIALOG1 } saying the ID is an undeclared identifier. that's lame. any ideas how to get rid of this? thanks, Jake

      C Offline
      C Offline
      Carlos Antollini
      wrote on last edited by
      #2

      Check if in the resource.h header file you have that ID. And if in the header of your Dlg class you have the include of the resource.h Cheers!!!! Carlos Antollini.

      J 1 Reply Last reply
      0
      • C Carlos Antollini

        Check if in the resource.h header file you have that ID. And if in the header of your Dlg class you have the include of the resource.h Cheers!!!! Carlos Antollini.

        J Offline
        J Offline
        Jake Palmer
        wrote on last edited by
        #3

        The ID's are in resource.h, which is included only in my CWinApp-derived class. The app's header is included automatically in every cpp file in the project. So, when I compile the class in question, it picks up the include and works fine, but when I build the project, it apparently looks at the headers first and gives me trouble. should i include the app's header in the problem header, instead of in it's cpp file?

        C 1 Reply Last reply
        0
        • J Jake Palmer

          The ID's are in resource.h, which is included only in my CWinApp-derived class. The app's header is included automatically in every cpp file in the project. So, when I compile the class in question, it picks up the include and works fine, but when I build the project, it apparently looks at the headers first and gives me trouble. should i include the app's header in the problem header, instead of in it's cpp file?

          C Offline
          C Offline
          Carlos Antollini
          wrote on last edited by
          #4

          First. Try to include the header in the header of the class dialog. Second. Check if the value of IDD_DIALOG1 is correct, or if is dupplicated. If the problem persist, try to sen me the project by mail. Good luck!!!! Carlos Antollini.

          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