HOWTO: Detect Closure of Command Window from a Console AppLast reviewed: January 6, 1998Article ID: Q102429 |
The information in this article applies to:
SUMMARYWin32 console applications run in a command window. So that the console application can detect when the console is closing, register a console control handler and look for the following values in your case statement:
CTRL_CLOSE_EVENT User closes the console CTRL_LOGOFF_EVENT User logs off CTRL_SHUTDOWN_EVENT User shuts down the systemFor an example, see the CONSOLE sample. For more information, see the entry for SetConsoleCtrlhandler() in the Win32 application programming interface (API) reference. Keywords : BseCon Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |