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. ATL / WTL / STL
  4. [wtl] Making a Wizard-Only app

[wtl] Making a Wizard-Only app

Scheduled Pinned Locked Moved ATL / WTL / STL
c++jsonquestion
2 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.
  • U Offline
    U Offline
    User 12162796
    wrote on last edited by
    #1

    Hi, I'm designing an application that consists of ONLY a wizard. I use this code to show it. int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT) { CMainWizard wizard; if ( IDOK == wizard.DoModal() ) { } return 0; } The rest of the code is default wizard code. It all works perfectly but when i close the wizard with the cancel button i get a first chance exeception. It think this is because Run() always returns zero. What should i do to let it exit in an ordinate fashion? Thnx:)

    E 1 Reply Last reply
    0
    • U User 12162796

      Hi, I'm designing an application that consists of ONLY a wizard. I use this code to show it. int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT) { CMainWizard wizard; if ( IDOK == wizard.DoModal() ) { } return 0; } The rest of the code is default wizard code. It all works perfectly but when i close the wizard with the cancel button i get a first chance exeception. It think this is because Run() always returns zero. What should i do to let it exit in an ordinate fashion? Thnx:)

      E Offline
      E Offline
      Ernesto D
      wrote on last edited by
      #2

      i dont think that the error is caused by your return code, you need to step into the code on the cancel button handler and try to "isolate" the line that causes the exception, watch variables and go line by line till you find out whats wrong. If you still cant find whats wrong, post the code for your CMainWizard class so we can help you find the problem. HTH

      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