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. Mobile Development
  3. Mobile
  4. Killing an aplication

Killing an aplication

Scheduled Pinned Locked Moved Mobile
7 Posts 2 Posters 5 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.
  • M Offline
    M Offline
    Mariz
    wrote on last edited by
    #1

    When i press the X of my aplication, it doesn´t kill it... It´s a kind of minimize. Shouldn´t it pass througth the destructor.

    J 1 Reply Last reply
    0
    • M Mariz

      When i press the X of my aplication, it doesn´t kill it... It´s a kind of minimize. Shouldn´t it pass througth the destructor.

      J Offline
      J Offline
      Joao Paulo Figueira
      wrote on last edited by
      #2

      PocketPC 2002? Yeah, it does not close your app unless it is a dialog-based app... The OS is supposed to automatically manage memory.

      M 1 Reply Last reply
      0
      • J Joao Paulo Figueira

        PocketPC 2002? Yeah, it does not close your app unless it is a dialog-based app... The OS is supposed to automatically manage memory.

        M Offline
        M Offline
        Mariz
        wrote on last edited by
        #3

        i have one dialog(login) and a few CWnd... is their a way to "kill" the application, when i press the close button(X)?

        J 1 Reply Last reply
        0
        • M Mariz

          i have one dialog(login) and a few CWnd... is their a way to "kill" the application, when i press the close button(X)?

          J Offline
          J Offline
          Joao Paulo Figueira
          wrote on last edited by
          #4

          Mariz wrote: press the close button(X) Well, it is NOT a close button. Microsoft calls it a "smart minimize" button. When you press it on the main window, you get a stream of messages, the first of which is WM_IME_NOTIFY with wParam = IMN_CLOSESTATUSWINDOW. The second message is WM_IME_SETCONTEXT with wParam = FALSE and lParam = ISC_SHOWUIALL. Maybe you can intercept these messages and close your application appropriately, by sending a WM_CLOSE message to your main window.

          M 1 Reply Last reply
          0
          • J Joao Paulo Figueira

            Mariz wrote: press the close button(X) Well, it is NOT a close button. Microsoft calls it a "smart minimize" button. When you press it on the main window, you get a stream of messages, the first of which is WM_IME_NOTIFY with wParam = IMN_CLOSESTATUSWINDOW. The second message is WM_IME_SETCONTEXT with wParam = FALSE and lParam = ISC_SHOWUIALL. Maybe you can intercept these messages and close your application appropriately, by sending a WM_CLOSE message to your main window.

            M Offline
            M Offline
            Mariz
            wrote on last edited by
            #5

            I think your solution is good but... visual doesn't recognize WM_IME_NOTIFY(i put it in MainFrame Message_Map). Any idea...?

            J 1 Reply Last reply
            0
            • M Mariz

              I think your solution is good but... visual doesn't recognize WM_IME_NOTIFY(i put it in MainFrame Message_Map). Any idea...?

              J Offline
              J Offline
              Joao Paulo Figueira
              wrote on last edited by
              #6

              Developing with MFC? Handling "strange" messages is a bitch. Gess what: you have to intercept the window's message loop and do some old-style C-like message handling. Nice huh? Hack the window class WindowProc!

              M 1 Reply Last reply
              0
              • J Joao Paulo Figueira

                Developing with MFC? Handling "strange" messages is a bitch. Gess what: you have to intercept the window's message loop and do some old-style C-like message handling. Nice huh? Hack the window class WindowProc!

                M Offline
                M Offline
                Mariz
                wrote on last edited by
                #7

                "Smart minimize" button? Strange... In the WindowProc function, witch messages do i have to intercept? WM_IME_NOTIFY with wParam=IMN_CLOSESTATUSWINDOW and WM_IME_SETCONTEXT with wParam=FALSE and lParam = ISC_SHOWUIALL... I am not getting good results... Any ideas?

                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