An application that has a window with a system menu can change the size and position of that window by sending system commands. The system commands are generated when the user chooses commands from the system menu. An application can emulate the user action by sending a WM_SYSCOMMAND message to the window.
Following are some of the system commands:
┌───────────────┬─────────────────────────────────────────────┐ │Command │Description │ ├───────────────┼─────────────────────────────────────────────┤ │SC_SIZE │Starts a Size command. The user can change │ │ │the size of the window with a mouse and the │ │ │keyboard. │ ├───────────────┼─────────────────────────────────────────────┤ │SC_MOVE │Starts a Move command. The user can move the│ │ │window with a mouse and the keyboard. │ ├───────────────┼─────────────────────────────────────────────┤ │SC_MINIMIZE │Minimizes the window. │ ├───────────────┼─────────────────────────────────────────────┤ │SC_MAXIMIZE │Maximizes the window. │ ├───────────────┼─────────────────────────────────────────────┤ │SC_RESTORE │Restores a minimized or maximized window to │ │ │its previous size and position. │ ├───────────────┼─────────────────────────────────────────────┤ │SC_CLOSE │Closes the window. This command sends a │ │ │WM_CLOSE message to the window. The window │ │ │performs all tasks needed to clean up and │ │ │destroy itself. │ └───────────────┴─────────────────────────────────────────────┘