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. Multiple Forms in MS VC++

Multiple Forms in MS VC++

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpc++winformscom
3 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.
  • T Offline
    T Offline
    Tom Sapp
    wrote on last edited by
    #1

    I am creating a Windows Forms Application (.NET) and am trying to create and show my own About dialog but I can't figure this out. I have tried doing searches here and on the net but everything I am finding says to do one of two things: AboutDialog::Show(); or AboutDialog myDialog = new AboutDialog(); myDialog.Show(); Either way I do this it gives me an error of "error C2065: 'AboutDialog' : undeclared identifier" Forgive me for asking so many questions but I am still learning and this is one of the ways I find the easiest! Only problem is I am having a heck of a time figuring out how to search for stuff for C++. Thanks, Tom Sapp http://www.sappsworld.com

    G 1 Reply Last reply
    0
    • T Tom Sapp

      I am creating a Windows Forms Application (.NET) and am trying to create and show my own About dialog but I can't figure this out. I have tried doing searches here and on the net but everything I am finding says to do one of two things: AboutDialog::Show(); or AboutDialog myDialog = new AboutDialog(); myDialog.Show(); Either way I do this it gives me an error of "error C2065: 'AboutDialog' : undeclared identifier" Forgive me for asking so many questions but I am still learning and this is one of the ways I find the easiest! Only problem is I am having a heck of a time figuring out how to search for stuff for C++. Thanks, Tom Sapp http://www.sappsworld.com

      G Offline
      G Offline
      gr8coaster329
      wrote on last edited by
      #2

      Tom Sapp wrote:

      AboutDialog::Show(); AboutDialog myDialog = new AboutDialog(); myDialog.Show();

      is the name of the form you created AboutDialog? if not replace AboutDialog with the name of your form, the way that i do it is: FormName^ myForm = gcnew FormName(); myForm->ShowDialog(); the "myForm" part can be replace with anything that you want it to be just make sure that it is the same in both lines of the code. also make sure that you include the header file of the form (#include "fileName.h") at the top of the file. i hope i worded this right, and that it helps you - Kyle

      T 1 Reply Last reply
      0
      • G gr8coaster329

        Tom Sapp wrote:

        AboutDialog::Show(); AboutDialog myDialog = new AboutDialog(); myDialog.Show();

        is the name of the form you created AboutDialog? if not replace AboutDialog with the name of your form, the way that i do it is: FormName^ myForm = gcnew FormName(); myForm->ShowDialog(); the "myForm" part can be replace with anything that you want it to be just make sure that it is the same in both lines of the code. also make sure that you include the header file of the form (#include "fileName.h") at the top of the file. i hope i worded this right, and that it helps you - Kyle

        T Offline
        T Offline
        Tom Sapp
        wrote on last edited by
        #3

        Cool, apparently the #include "AboutDialog.h" part is what I was missing. I am used to using Delphi that automatically includes these types of things. I will try to remember that from now on! :D Thanks, Tom Sapp http://www.sappsworld.com

        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