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. Question to exit app

Question to exit app

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

    Hello all! I have a little problem in my project (VC++ 6.0). I want to show user a dialog box with question "exit app or not" when he tries to close application. Where shoult I write a handle to this event? Thank you! Dmitry Timin

    A 1 Reply Last reply
    0
    • D dima_t

      Hello all! I have a little problem in my project (VC++ 6.0). I want to show user a dialog box with question "exit app or not" when he tries to close application. Where shoult I write a handle to this event? Thank you! Dmitry Timin

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

      I believe you can do this by overriding the default OnClose() method (WM_CLOSE message)in the main frame window of your application. Then call the CFrameWnd::OnClose() method if the user clicks "OK". - Anatari

      A 1 Reply Last reply
      0
      • A Anatari

        I believe you can do this by overriding the default OnClose() method (WM_CLOSE message)in the main frame window of your application. Then call the CFrameWnd::OnClose() method if the user clicks "OK". - Anatari

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        how will you differ if user clicked exit or the computer is going shutdown? a message box would than be totaly anoying.

        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