Killing an aplication
-
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.
PocketPC 2002? Yeah, it does not close your app unless it is a dialog-based app... The OS is supposed to automatically manage memory.
-
PocketPC 2002? Yeah, it does not close your app unless it is a dialog-based app... The OS is supposed to automatically manage memory.
-
i have one dialog(login) and a few CWnd... is their a way to "kill" the application, when i press the close button(X)?
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
withwParam = IMN_CLOSESTATUSWINDOW
. The second message isWM_IME_SETCONTEXT
withwParam = FALSE
andlParam = ISC_SHOWUIALL
. Maybe you can intercept these messages and close your application appropriately, by sending aWM_CLOSE
message to your main window. -
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
withwParam = IMN_CLOSESTATUSWINDOW
. The second message isWM_IME_SETCONTEXT
withwParam = FALSE
andlParam = ISC_SHOWUIALL
. Maybe you can intercept these messages and close your application appropriately, by sending aWM_CLOSE
message to your main window. -
I think your solution is good but... visual doesn't recognize WM_IME_NOTIFY(i put it in MainFrame Message_Map). Any idea...?
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
! -
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
!"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?