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. Confused with the resource using

Confused with the resource using

Scheduled Pinned Locked Moved C / C++ / MFC
c++debugginghelplearningworkspace
5 Posts 3 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.
  • B Offline
    B Offline
    bloodwinner
    wrote on last edited by
    #1

    I am using VC++6.0 and trying to run a demo project about the dialog resources using from <>. I copyed its .cpp file, resource.h file into my project, and pasted its .rc file into my .rc file using notepad and add into the project also. But it didn't work,and pop out these errors: --------------------Configuration: mymenu - Win32 Debug-------------------- Compiling... mymenu.cpp E:\work\project\mymenu\mymenu.cpp(20) : error C2065: 'IDC_BLACK' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(22) : error C2065: 'IDC_RECT' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(195) : error C2065: 'IDM_APP_ABOUT' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(195) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(203) : warning C4060: switch statement contains no 'case' or 'default' labels E:\work\project\mymenu\mymenu.cpp(257) : error C2065: 'IDC_WHITE' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(259) : error C2065: 'IDC_ELLIPSE' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(263) : error C2065: 'IDC_PAINT' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(299) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(301) : error C2065: 'IDC_RED' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(301) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(303) : error C2065: 'IDC_GREEN' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(303) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(305) : error C2065: 'IDC_YELLOW' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(305) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(307) : error C2065: 'IDC_BLUE' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(307) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(309) : error C2065: 'IDC_MAGENTA' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(309) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(311) : error C2065: 'IDC_CYAN' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(311) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(313) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(325) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(327) : error C2051: case expression not constant Error executing c

    H 1 Reply Last reply
    0
    • B bloodwinner

      I am using VC++6.0 and trying to run a demo project about the dialog resources using from <>. I copyed its .cpp file, resource.h file into my project, and pasted its .rc file into my .rc file using notepad and add into the project also. But it didn't work,and pop out these errors: --------------------Configuration: mymenu - Win32 Debug-------------------- Compiling... mymenu.cpp E:\work\project\mymenu\mymenu.cpp(20) : error C2065: 'IDC_BLACK' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(22) : error C2065: 'IDC_RECT' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(195) : error C2065: 'IDM_APP_ABOUT' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(195) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(203) : warning C4060: switch statement contains no 'case' or 'default' labels E:\work\project\mymenu\mymenu.cpp(257) : error C2065: 'IDC_WHITE' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(259) : error C2065: 'IDC_ELLIPSE' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(263) : error C2065: 'IDC_PAINT' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(299) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(301) : error C2065: 'IDC_RED' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(301) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(303) : error C2065: 'IDC_GREEN' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(303) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(305) : error C2065: 'IDC_YELLOW' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(305) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(307) : error C2065: 'IDC_BLUE' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(307) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(309) : error C2065: 'IDC_MAGENTA' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(309) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(311) : error C2065: 'IDC_CYAN' : undeclared identifier E:\work\project\mymenu\mymenu.cpp(311) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(313) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(325) : error C2051: case expression not constant E:\work\project\mymenu\mymenu.cpp(327) : error C2051: case expression not constant Error executing c

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

      "undeclared identifier" it seems you need to include a header file to mymenu.cppdid you include this file?:)

      _**


      **_

      WhiteSky


      B 1 Reply Last reply
      0
      • H Hamid Taebi

        "undeclared identifier" it seems you need to include a header file to mymenu.cppdid you include this file?:)

        _**


        **_

        WhiteSky


        B Offline
        B Offline
        bloodwinner
        wrote on last edited by
        #3

        yes, as you can see in .cpp file, I had #include #include "resource.h"

        T H 2 Replies Last reply
        0
        • B bloodwinner

          yes, as you can see in .cpp file, I had #include #include "resource.h"

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          check the Ignore HTML tags in this message (good for code snippets) check box :(


          TOXCCT >>> GEII power

          [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

          1 Reply Last reply
          0
          • B bloodwinner

            yes, as you can see in .cpp file, I had #include #include "resource.h"

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

            sure you include but i cant see header file in previous your thread i saw only #include:) anyway these erros are only a thing a include:)

            _**


            **_

            WhiteSky


            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