The System menu, identified by an icon at the left end of the title bar, is a pop-up menu that contains the system commands. The system commands are commands selected by the user to direct Windows to carry out actions on the window, such as moving and closing it.
If a System menu or close box is desired for a window, the WS_SYSMENU and WS_CAPTION window styles must be specified when the window is created.