Microsoft Foundation Classes (mfc.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
CWnd::GetSystemMenu
◄CWnd► ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
CMenu* GetSystemMenu( BOOL bRevert ) const;
Parameter Description
<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 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. Menu items on the Control
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 automatically dims items on the standard Control menu, depending
on the situation. CWnd can carry out its own checking or dimming by
responding to the ◄WM_INITMENU► messages, which are sent before any menu
is displayed.
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.
See Also
◄CMenu::AppendMenu►, ◄CMenu::InsertMenu►, ◄CMenu::ModifyMenu►,
◄::GetSystemMenu►
-♦-