ISystemMenu

The ISystemMenu class enables you to manipulate your application's copy of the system menu. You can add, change, or remove items from the system menu for your application.

You can use the member functions in the classes IMenu and ISubmenu to change the ISystemMenu. You can also add objects of the class IMenuItem to the ISystemMenu.

The member functions IMenu::disableItem and ISubmenu::disableItem can have no effect in certain situations. For example, you cannot disable the Size menu item on the system menu if the frame window has a sizing border.

Portability Considerations

AIX does not support the ISystemMenu::idClose member. In AIX, this is equivalent to the ClientMessage sent when the user selects Alt+F4 on a frame window.

In OS/2 Presentation Manager, this is the same as the SC_CLOSE system command. You can use ISystemMenu::idClose with ICommandHandler::systemCommand. Within systemCommand, compare ISystemMenu::idClose to the event's command ID. This is useful when you require a confirmation window for closing your application.

Windows Considerations

In the Windows operating system, ISystemMenu::idHide has the same effect as ISystemMenu::idMinimize.


ISystemMenu - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class. You cannot copy or assign ISystemMenu objects because both the copy constructor and assignment operator are private functions.


[view class]
~ISystemMenu
public:
virtual ~ISystemMenu()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
ISystemMenu
public:
ISystemMenu(IFrameWindow* owner)

Constructs an ISystemMenu object for the system menu of the specified IFrameWindow object.

Exception

IInvalidParameter owner is 0. You must specify a valid IFrameWindow as the ISystemMenu owner.
IInvalidRequest The specified frame window does not have a system menu.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


Item Identifiers

Use item identifier members when calling IMenu functions to affect items on the system menu.

When you want to add to the system menu pull-down, specify the ISystemMenu::idPulldown member for intoSubmenuId when calling IMenu::addItem. For example:

sysmenu.addItem(myMenuItem, ISystemMenu::idPulldown);

If you do not specify ISystemMenu::idPulldown, myMenuItem appears on the title bar to the right of the system menu icon.

If you place additional menu items on the title bar, use bitmap items rather than text items.
Note: When adding a bitmap item to the title bar using IMenu::addBitmap, myBitmapHandle needs to reference a bitmap whose dimensions are 40 x 36. For example:

sysmenu.addBitmap(myMenuItem, myBitmapHandle);

Additionally, if you add more that one bitmap to the right of the system menu icon, draw each bitmap so that its left edge provides a visual separator.


[view class]
idClose
public:
static const unsigned long idClose

Identifier of the Close system menu item.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
idHide
public:
static const unsigned long idHide

Identifier of the Hide system menu item.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored

Windows Considerations

This identifier has the same value as the idMinimize identifier.


[view class]
idMaximize
public:
static const unsigned long idMaximize

Identifier of the Maximize system menu item.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


[view class]
idMinimize
public:
static const unsigned long idMinimize

Identifier of the Minimize system menu item.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


[view class]
idMove
public:
static const unsigned long idMove

Identifier of the Move system menu item.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


[view class]
idPulldown
public:
static const unsigned long idPulldown

Identifier of the system menu pull-down. Use this identifier as the submenu identifier for the system menu.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


[view class]
idRestore
public:
static const unsigned long idRestore

Identifier of the Restore system menu item.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


[view class]
idSize
public:
static const unsigned long idSize

Identifier of the Size system menu item.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


[view class]
idWindowList
public:
static const unsigned long idWindowList

Identifier of the Window list system menu item.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


ISystemMenu - Inherited Member Functions and Data

Inherited Public Functions

IMenu
INotifier
IStandardNotifier

Inherited Public Data

INotifier
IMenu

Inherited Protected Functions

INotifier
IStandardNotifier
IMenu

Inherited Protected Data