CWnd::GetSystemMenu
CMenu*GetSystemMenu(BOOLbRevert**)const;**
Return Value
Identifies a copy of the Control menu if bRevert is FALSE. If bRevert is TRUE, the return value is undefined.
The returned pointer may be temporary and should not be stored for later use.
Parameters
bRevert
Specifies the action to be taken. If bRevert is FALSE, GetSystemMenu returns a handle to a copy of the Control menu currently in use. This copy is initially identical to the Control menu but can be modified. If bRevert is TRUE, GetSystemMenu resets the Control menu back to the default state. The previous, possibly modified, Control menu, if any, is destroyed. The return value is undefined in this case.
Remarks
Allows the application to access the Control menu for copying and modification.
Any window that does not use GetSystemMenu to make its own copy of the Control menu receives the standard Control menu.
The pointer returned by the GetSystemMenu member function can be used with the CMenu::AppendMenu, CMenu::InsertMenu, or CMenu::ModifyMenu functions to change the Control menu.
The Control menu initially contains items identified with various ID values such as SC_CLOSE, SC_MOVE, and SC_SIZE. Items on the Control menu generate WM_SYSCOMMAND messages. All predefined Control-menu items have ID numbers greater than 0xF000. If an application adds items to the Control menu, it should use ID numbers less than F000.
Windows may automatically dim items on the standard Control menu. CWnd can carry out its own checking or dimming by responding to the WM_INITMENU messages, which are sent before any menu is displayed.
CWnd Overview | Class Members | Hierarchy Chart
See Also CMenu::AppendMenu, CMenu::InsertMenu, CMenu::ModifyMenu,