Vincent Fatica
2007-07-22 17:53:56 UTC
In an extension (DLL) to a subsystem:windows app I'm trying to make the app hard
to close. A simple WH_GETMESSAGE hook correctly sees <WM_SYSCOMMAND, SC_CLOSE>
when it's generated by the system menu's "Close" (also <Alt-F4>) and translates
it into <WM_SYSCOMMAND, SC_MINIMIZE>. But my hook fails to see <WM_SYSCOMMAND,
SC_CLOSE> when it was generated by the title bar's "X" button. The application
does not set any other hooks.
What's going on here? Can I work around it?
Thanks.
to close. A simple WH_GETMESSAGE hook correctly sees <WM_SYSCOMMAND, SC_CLOSE>
when it's generated by the system menu's "Close" (also <Alt-F4>) and translates
it into <WM_SYSCOMMAND, SC_MINIMIZE>. But my hook fails to see <WM_SYSCOMMAND,
SC_CLOSE> when it was generated by the title bar's "X" button. The application
does not set any other hooks.
What's going on here? Can I work around it?
Thanks.
--
- Vince
- Vince