Can someone tell me what message is posted to an application when the user presses Ctrl + C to terminate the application.
Regards,
Shelly.
Printable View
Can someone tell me what message is posted to an application when the user presses Ctrl + C to terminate the application.
Regards,
Shelly.
Which environment are you using - Ctrl+C doesn't terminate an application in windows ?
If you are describing a console based application, Ctrl+C is typically processed by a default interrupt handler.
This arrangement can be overridden using SetConsoleCtrlHandler in NT/2000
If you are describing ALT+F4 to close a window (and possibly an application) Windows posts a WM_SYSCOMMAND message to the window with SC_CLOSE as the WPARAM. This can be handled by the OnSysCommand message handler if it is derived from CWnd.
In a typical windows application, CTRL+C is used to copy data to the clipboard.
Hope this helps,
- Nigel