OWLNext 7.0
Borland's Object Windows Library for the modern age
|
The TSystemMenu class lets you modify a window's system menu.
TSystemMenu is derived from TMenu and differs from it only in its constructor, which takes a window handle and a bool flag. If the flag is true, the current system menu is deleted and a menu object representing the unmodified menu that is put in its place is created. If the flag is false, the menu object represents the current system menu. By default this flag is false.
You can use all the member functions inherited from TMenu to manipulate the system menu.
The following example shows how to add an About... menu choice to the system menu:
Notice that the system menu is modified in the SetupWindow function of the window object. The system menu should be modified before the window is created. It is usually easiest to do this simply by overriding the base window class's SetupWindow function.