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. How Add dialog and show it?

How Add dialog and show it?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++hostingcloudquestion
5 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
    sepel
    wrote on last edited by
    #1

    Hi Experts. I'm new in Mfc. In c# I cloud easily add new form to my application and show it. At first step in Mfc I need to add some dialog to my application and then from some menu or button command display it. But I mixed to how do it? Thanks for your kinds.

    sepel

    A 1 Reply Last reply
    0
    • S sepel

      Hi Experts. I'm new in Mfc. In c# I cloud easily add new form to my application and show it. At first step in Mfc I need to add some dialog to my application and then from some menu or button command display it. But I mixed to how do it? Thanks for your kinds.

      sepel

      A Offline
      A Offline
      A Ms
      wrote on last edited by
      #2

      From 'View' Menu Choose to see Resource 'View Panel' in your IDE In the Resource View Panel Expand Items and right click the Dialog Branch and Choose 'Add Resource' and press New Button of add Resource Dialog. After your dialog has created you can see it in Resource Designer when ever you want by Double Clicking on it in Resource View Panel. After You do all these Right Click on your Dialog in Resource Designed and choose 'Add Class' fill the class field with a name (e.g. "CTemp1Dlg")and before Finishing the wizard attention the names of .Cpp File and .h file which is created for you through wizard (here : Temp1Dlg.h and Temp1Dlg.cpp) now include the Temp1Dlg.h File created in previous step in your Code which you want to Modal your Dialog. in the method you want to Modal your Dialog write the below code:

      CTemp1Dlg dlgMyDialog(this);
      dlgMyDialog.DoModal();

      S 1 Reply Last reply
      0
      • A A Ms

        From 'View' Menu Choose to see Resource 'View Panel' in your IDE In the Resource View Panel Expand Items and right click the Dialog Branch and Choose 'Add Resource' and press New Button of add Resource Dialog. After your dialog has created you can see it in Resource Designer when ever you want by Double Clicking on it in Resource View Panel. After You do all these Right Click on your Dialog in Resource Designed and choose 'Add Class' fill the class field with a name (e.g. "CTemp1Dlg")and before Finishing the wizard attention the names of .Cpp File and .h file which is created for you through wizard (here : Temp1Dlg.h and Temp1Dlg.cpp) now include the Temp1Dlg.h File created in previous step in your Code which you want to Modal your Dialog. in the method you want to Modal your Dialog write the below code:

        CTemp1Dlg dlgMyDialog(this);
        dlgMyDialog.DoModal();

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

        It works !. Thanks Amir. Dear Amir,I have some expert in C# and now I migrate to mfc for some interesting and some works !. Can I ask you guide me to some books or another resource to help me learn mfc better( and quick)? Best Regards

        sepel

        A 1 Reply Last reply
        0
        • S sepel

          It works !. Thanks Amir. Dear Amir,I have some expert in C# and now I migrate to mfc for some interesting and some works !. Can I ask you guide me to some books or another resource to help me learn mfc better( and quick)? Best Regards

          sepel

          A Offline
          A Offline
          A Ms
          wrote on last edited by
          #4

          Ok Please Don't hesitate to ask any question ,But I could not promise if I could answer them all. Here is a list of update books you may like to use, How ever mostl of MFC guide books found in the net are old ones but they could be useful too because the bases are the same: http://msdn.microsoft.com/en-us/visualc/dd721903.aspx[^] By the way for those who are new to MFC, How Do I? Video Series[^] would be interesting.

          S 1 Reply Last reply
          0
          • A A Ms

            Ok Please Don't hesitate to ask any question ,But I could not promise if I could answer them all. Here is a list of update books you may like to use, How ever mostl of MFC guide books found in the net are old ones but they could be useful too because the bases are the same: http://msdn.microsoft.com/en-us/visualc/dd721903.aspx[^] By the way for those who are new to MFC, How Do I? Video Series[^] would be interesting.

            S Offline
            S Offline
            sepel
            wrote on last edited by
            #5

            So Helpful. Thanks again.

            sepel

            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