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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. next dialog

next dialog

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++help
3 Posts 3 Posters 1 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.
  • D Offline
    D Offline
    doraemon1
    wrote on last edited by
    #1

    I just wish to have 2 dialogs in my MFC prrogram: when I click "next" in dialog1, then dialog1 disappear and replaced with dialog2. that's it. how can i do this? I am new to MFC... would any one pls help?? Many Thanks!

    G D 2 Replies Last reply
    0
    • D doraemon1

      I just wish to have 2 dialogs in my MFC prrogram: when I click "next" in dialog1, then dialog1 disappear and replaced with dialog2. that's it. how can i do this? I am new to MFC... would any one pls help?? Many Thanks!

      G Offline
      G Offline
      Gary R Wheeler
      wrote on last edited by
      #2

      CMyDialog1 dlg1;
      CMyDialog2 dlg2;
      int result = dlg1.DoModal();
      if (result == NEXTCLICKED) {
      dlg2.DoModal();
      }

      CMyDialog1 and CMyDialog2 are the dialog classes for your two dialogs. NEXTCLICKED is a constant value. In your 'next' button handler in the CMyDialog1 class, call EndDialog(NEXTCLICKED);.


      Software Zen: delete this;

      1 Reply Last reply
      0
      • D doraemon1

        I just wish to have 2 dialogs in my MFC prrogram: when I click "next" in dialog1, then dialog1 disappear and replaced with dialog2. that's it. how can i do this? I am new to MFC... would any one pls help?? Many Thanks!

        D Offline
        D Offline
        DavidR_r
        wrote on last edited by
        #3

        Consider use of tab control, for example this is the way for building wizards DavidR

        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