WM_SYSCOMMANDA window receives this message when the user chooses a command from the window menu (also known as the System menu or Control menu) or when the user chooses the Maximize button or Minimize button.WM_SYSCOMMAND uCmdType = wParam; // type of system command requested xPos = LOWORD(lParam); // horizontal postion, in screen coordinates yPos = HIWORD(lParam); // vertical postion, in screen coordinates uCmdTypeSpecifies the type of system command requested. This can be one of these values:Value Meaning SC_CLOSE Closes the window. SC_CONTEXTHELP Changes the cursor to a question with a pointer. If the user then clicks a control in the dialog box, the control receives a WM_HELP message. SC_DEFAULT Selects the default item; the user double-clicked the window menu. SC_HOTKEY Activates the window associated with the application-specified hot key. The low-order word of lParam identifies the window to activate. SC_HSCROLL Scrolls horizontally. SC_KEYMENU Retrieves the window menu as a result of a keystroke. SC_MAXIMIZE (or SC_ZOOM) Maximizes the window. SC_MINIMIZE (or SC_ICON) Minimizes the window.
uCmdType = wParam; // type of system command requested
xPos = LOWORD(lParam); // horizontal postion, in screen coordinates
yPos = HIWORD(lParam); // vertical postion, in screen coordinates uCmdTypeSpecifies the type of system command requested. This can be one of these values:Value Meaning
SC_CLOSE Closes the window.
SC_CONTEXTHELP Changes the cursor to a question with a pointer. If the user then clicks a control in the dialog box, the control receives a WM_HELP message.
SC_DEFAULT Selects the default item; the user double-clicked the window menu.
SC_HOTKEY Activates the window associated with the application-specified hot key. The low-order word of lParam identifies the window to activate.
SC_HSCROLL Scrolls horizontally.
SC_KEYMENU Retrieves the window menu as a result of a keystroke.
SC_MAXIMIZE (or SC_ZOOM) Maximizes the window.
SC_MINIMIZE (or SC_ICON) Minimizes the window.