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. New Dialog in a saved .exe

New Dialog in a saved .exe

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpannouncementlearning
10 Posts 5 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.
  • R Offline
    R Offline
    Reagan Conservative
    wrote on last edited by
    #1

    While trying to add a new dialog (for login), after I build the dialog resource and compile the new class, I get errors saying that the IDD_DIALOG1 can't be found, even though it is in the .h file. This is where the error message points back to (the .h file). Anyone know why this is reacting the way it is. This is the first version of Visual C++ 6.0. Thanks. John P.

    Z Z D M 4 Replies Last reply
    0
    • R Reagan Conservative

      While trying to add a new dialog (for login), after I build the dialog resource and compile the new class, I get errors saying that the IDD_DIALOG1 can't be found, even though it is in the .h file. This is where the error message points back to (the .h file). Anyone know why this is reacting the way it is. This is the first version of Visual C++ 6.0. Thanks. John P.

      Z Offline
      Z Offline
      Zac Howland
      wrote on last edited by
      #2

      Check to make sure that the IDD_DIALOG1 has a unique definition in your resource.h file. If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

      R 1 Reply Last reply
      0
      • Z Zac Howland

        Check to make sure that the IDD_DIALOG1 has a unique definition in your resource.h file. If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

        R Offline
        R Offline
        Reagan Conservative
        wrote on last edited by
        #3

        The IDD_DIALOG1 is unique. Also the ID_EMPID and ID_EMPPIN, for the two text iput boxes also generate errors. This .EXE file was created by a third party and supposedly we can add new items to this workspace/project. Is there any kind of control that the original maker can add in Visual C++ that inhibits or prevents new items from being added? Thanks for your input. John P.

        Z 1 Reply Last reply
        0
        • R Reagan Conservative

          The IDD_DIALOG1 is unique. Also the ID_EMPID and ID_EMPPIN, for the two text iput boxes also generate errors. This .EXE file was created by a third party and supposedly we can add new items to this workspace/project. Is there any kind of control that the original maker can add in Visual C++ that inhibits or prevents new items from being added? Thanks for your input. John P.

          Z Offline
          Z Offline
          Zac Howland
          wrote on last edited by
          #4

          So, if I understand you correctly, you have the source code for a third party application and are adding a new resource (and corresponding classes) to it? That being the case, then no, there is nothing they could do to make it so you cannot add a new resource. What error are you getting exactly? If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

          R 1 Reply Last reply
          0
          • Z Zac Howland

            So, if I understand you correctly, you have the source code for a third party application and are adding a new resource (and corresponding classes) to it? That being the case, then no, there is nothing they could do to make it so you cannot add a new resource. What error are you getting exactly? If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

            R Offline
            R Offline
            Reagan Conservative
            wrote on last edited by
            #5

            For the IDD_DIALOG1, the compiler returns: error C2065: undeclared identifier error C2057: expected constant expression Even though the IDD_DIALOG1 is in the .h file as: //{{AFX_DATA (CloginDialog) enum { IDD_DIALOG1 }; CString m_empIDnum; CString m_empPIN; //}}AFX_DATA I also get errors saying that the two CString variables above are "undefined" This just doesn't make sense since Visual C++ made them part of the code. Thanks, Zac. John P.

            Z 1 Reply Last reply
            0
            • R Reagan Conservative

              For the IDD_DIALOG1, the compiler returns: error C2065: undeclared identifier error C2057: expected constant expression Even though the IDD_DIALOG1 is in the .h file as: //{{AFX_DATA (CloginDialog) enum { IDD_DIALOG1 }; CString m_empIDnum; CString m_empPIN; //}}AFX_DATA I also get errors saying that the two CString variables above are "undefined" This just doesn't make sense since Visual C++ made them part of the code. Thanks, Zac. John P.

              Z Offline
              Z Offline
              Zac Howland
              wrote on last edited by
              #6

              Typically, the ClassWizard will inject the following when creating a new class:

              //{{AFX_DATA (CloginDialog)
              enum { IDD = IDD_DIALOG1 };
              CString m_empIDnum;
              CString m_empPIN;
              //}}AFX_DATA
              

              Is your class name lowercased like that? Usually you see "CLoginDialog". Chances are it is a typo along those lines somewhere. If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

              1 Reply Last reply
              0
              • R Reagan Conservative

                While trying to add a new dialog (for login), after I build the dialog resource and compile the new class, I get errors saying that the IDD_DIALOG1 can't be found, even though it is in the .h file. This is where the error message points back to (the .h file). Anyone know why this is reacting the way it is. This is the first version of Visual C++ 6.0. Thanks. John P.

                Z Offline
                Z Offline
                zeus_master
                wrote on last edited by
                #7

                have you add the #include "resource.h" in you application? in fact, these resource are defined in resource.h.

                R 1 Reply Last reply
                0
                • R Reagan Conservative

                  While trying to add a new dialog (for login), after I build the dialog resource and compile the new class, I get errors saying that the IDD_DIALOG1 can't be found, even though it is in the .h file. This is where the error message points back to (the .h file). Anyone know why this is reacting the way it is. This is the first version of Visual C++ 6.0. Thanks. John P.

                  D Offline
                  D Offline
                  dongqin
                  wrote on last edited by
                  #8

                  #include "resource.h" hello

                  1 Reply Last reply
                  0
                  • R Reagan Conservative

                    While trying to add a new dialog (for login), after I build the dialog resource and compile the new class, I get errors saying that the IDD_DIALOG1 can't be found, even though it is in the .h file. This is where the error message points back to (the .h file). Anyone know why this is reacting the way it is. This is the first version of Visual C++ 6.0. Thanks. John P.

                    M Offline
                    M Offline
                    MANISH RASTOGI
                    wrote on last edited by
                    #9

                    #include "resource.h" before the class declaration. MANISH RASTOGI

                    1 Reply Last reply
                    0
                    • Z zeus_master

                      have you add the #include "resource.h" in you application? in fact, these resource are defined in resource.h.

                      R Offline
                      R Offline
                      Reagan Conservative
                      wrote on last edited by
                      #10

                      To all three of you who suggested that I add the resource.h file ---- THANKS. What can I say but DUH!! Sometimes it's too obvious?? Thanks again! John P.

                      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