OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TSystemMenu creates a system menu object that then becomes the existing system menu. More...
#include <owl/menu.h>
Public Member Functions | |
TSystemMenu (HWND wnd, bool revert=false) | |
Constructs a system menu object. | |
Public Member Functions inherited from owl::TMenu | |
TMenu (TAutoDelete autoDelete=AutoDelete) | |
Creates an empty menu and sets autoDelete, by default, so that the menu is automatically deleted when the object is destroyed. | |
TMenu (const TMenu &original, TAutoDelete autoDelete=AutoDelete) | |
Creates a deep copy of an existing menu and sets autoDelete, by default, so that the menu is automatically deleted when the object is destroyed. | |
TMenu (HMENU handle, TAutoDelete autoDelete=NoAutoDelete) | |
Creates a menu object from an already loaded menu and sets autoDelete, by default, so the menu is not automatically deleted when the object is destroyed. | |
TMenu (HWND hWnd, TAutoDelete autoDelete=NoAutoDelete) | |
Creates a menu object representing the window's current menu and sets autoDelete, by default, so that the menu is not automatically deleted when the object is destroyed. | |
TMenu (const void *menuTemplate) | |
Creates a menu object from a menu template in memory. | |
TMenu (HINSTANCE instance, TResId resId) | |
Creates a menu object from a specified resource ID. | |
virtual | ~TMenu () |
TMenu & | operator= (const TMenu &) |
Copies an existing menu onto this menu, using DeepCopy. | |
void | CheckValid (uint redId=IDS_MENUFAILURE) |
Throws a TXMenu exception if the menu object is invalid. | |
virtual HMENU | GetHandle () const |
Returns the handle to the menu. | |
operator TMenuItem () const | |
Returns the menu's handle. | |
operator HMENU () const | |
Returns the menu's handle. | |
bool | IsOK () const |
Returns true if the menu has a valid handle. | |
bool | AppendMenu (uint flags, TMenuItem newItem=static_cast< unsigned int >(-1), LPCTSTR newStr=nullptr) |
Adds a text menu item to the end of the menu. | |
bool | AppendMenu (uint flags, TMenuItem newItem, const tstring &newStr) |
bool | AppendMenu (uint flags, TMenuItem newitem, const TBitmap &newBmp) |
Adds a bitmap menu item at the end of the menu. | |
bool | CheckMenuItem (uint item, uint check) |
Checks or unchecks the menu item. | |
bool | DeleteMenu (uint item, uint flags) |
Removes the menu item (item) from the menu or deletes the menu item if it's a pop-up menu. | |
bool | EnableMenuItem (uint item, uint enable) |
Enables, disables, or grays the menu item specified in the item parameter. | |
uint | GetMenuItemCount () const |
Returns the number of items in a top-level or pop-up menu. | |
uint | GetMenuItemID (int posItem) const |
Returns the ID of the menu item at the position specified by posItem. | |
uint | GetMenuState (uint item, uint flags) const |
Returns the menu flags for the menu item specified by item. | |
int | GetMenuString (uint item, TCHAR *str, int count, uint flags) const |
Returns the label (str) of the menu item (item). | |
tstring | GetMenuString (uint item, uint flags) const |
String-aware overload. | |
HMENU | GetSubMenu (int posItem) const |
Returns the handle of the menu specified by posItem. | |
bool | InsertMenu (uint item, uint flags, TMenuItem newItem=-1, LPCTSTR newStr=nullptr) |
Inserts a new text menu item or pop-up menu into the menu after the menu item specified in item. | |
bool | InsertMenu (uint item, uint flags, TMenuItem newItem, const tstring &newStr) |
bool | InsertMenu (uint item, uint flags, TMenuItem newItem, const TBitmap &newBmp) |
Adds a bitmap menu item after the menu item specified in item. | |
bool | ModifyMenu (uint item, uint flags, TMenuItem newItem=-1, LPCTSTR newStr=nullptr) |
Changes an existing menu item from the item specified in item to newItem. | |
bool | ModifyMenu (uint item, uint flags, TMenuItem newItem, const tstring &newStr) |
bool | ModifyMenu (uint item, uint flags, TMenuItem newItem, const TBitmap &newBmp) |
Changes an existing menu item into a bitmap. | |
bool | RemoveMenu (uint item, uint flags) |
Removes the menu item from the menu but does not delete it if it is a submenu. | |
bool | SetMenuItemBitmaps (uint item, uint flags, const TBitmap *bmpUnchecked=nullptr, const TBitmap *bmpChecked=nullptr) |
Specifies the bitmap to be displayed when the menu item is checked and unchecked. | |
uint | GetDefaultItem (bool getPos, uint flags) const |
bool | SetDefaultItem (uint posOrId, bool isPos) |
bool | CheckRadioItem (uint first, uint last, uint check, uint flags) |
bool | GetMenuItemInfo (uint posOrId, bool isPos, TMenuItemInfo &mi) const |
bool | SetMenuItemInfo (uint posOrId, bool isPos, TMenuItemInfo &mi) |
bool | InsertMenuItem (uint posOrId, bool isPos, TMenuItemInfo &mi) |
virtual void | MeasureItem (MEASUREITEMSTRUCT &measureItem) |
MeasureItem is used by owner-drawn controls to store the dimensions of the specified item. | |
virtual void | DrawItem (DRAWITEMSTRUCT &drawItem) |
DrawItem responds to a message forwarded to a drawable control by TWindow when the control needs to be drawn. | |
Additional Inherited Members | |
Static Public Member Functions inherited from owl::TMenu | |
static bool | GetMenuCheckMarkDimensions (TSize &size) |
Gets the size of the bitmap used to display the default check mark on checked menu items. | |
static TSize | GetMenuCheckMarkDimensions () |
Return the dimensions of the check mark bitmaps. | |
Static Protected Member Functions inherited from owl::TMenu | |
static void | DeepCopy (TMenu &dst, const TMenu &src, int srcOffset=0, int itemCount=-1) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static void | DeepCopy (TMenu &dst, int dstOffset, const TMenu &src, int srcOffset=0, int itemCount=-1) |
Copies menu items from the src menu to the dst menu. | |
TSystemMenu creates a system menu object that then becomes the existing system menu.