A window receives this message when the user chooses a command from the Window menu (formerly known as the system or control menu) or when the user chooses the maximize button, minimize button, restore button, or close button.
public enum SysCommands : int
Closes the window.
Changes the cursor to a question mark with a pointer. If the user then clicks a control in the dialog box, the control receives a WM_HELP message.
Selects the default item; the user double-clicked the window menu.
Activates the window associated with the application-specified hot key. The lParam parameter identifies the window to activate.
Same as SC_MINIMIZE
Retrieves the window menu as a result of a keystroke. If the wParam is SC_KEYMENU, lParam contains the character code of the key that is used with the ALT key to display the popup menu. For example, pressing ALT+F to display the File popup will cause a WM_SYSCOMMAND with wParam equal to SC_KEYMENU and lParam equal to 'f'.
Maximizes the window.
Minimizes the window.
Sets the state of the display. This command supports devices that have power-saving features, such as a battery-powered personal computer. The lParam parameter can have the following values: -1 (the display is powering on) 1 (the display is going to low power) 2 (the display is being shut off)
Retrieves the window menu as a result of a mouse click.
Moves the window.
Moves to the next window.
Moves to the previous window.
Restores the window to its normal position and size.
Executes the screen saver application specified in the [boot] section of the System.ini file.
Sizes the window.
Activates the Start menu.
Same as SC_MAXIMIZE
Indicates whether the screen saver is secure.