OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TMenu has a number of member functions and member operators you can call to find out information about the menu object and its menu.
You might need to call one of the query member functions before you call one of the modify member functions. For example, you need to call TMenu::GetMenuCheckmarkDimensions() before calling TMenu::SetMenuItemBitmaps(). The following table lists the menu object query member functions:
Menu object query member function | Description |
Querying the menu object as a whole | |
TMenu::operator uint() | Returns the menu's handle as a uint. |
TMenu::operator HMENU() | Returns the menu's handle as an HMENU. |
TMenu::IsOK() | Checks if the menu is OK (has a valid handle). |
TMenu::GetMenuItemCount() | Returns the number of items in the menu. |
TMenu::GetMenuCheckMarkDimensions(TSize&) | Gets the size of the bitmap used to display the check mark on checked menu items. |
Querying items in the menu | |
TMenu::GetMenuItemID(int) | Returns the ID of the menu item at the specified position. |
TMenu::GetMenuState(uint, uint) | Returns the state flags of the specified menu item. |
TMenu::GetMenuString(uint, char*, int, uint) | Gets the text of the given menu item. |
TMenu::GetSubMenu(int) | Returns the handle of the menu at the given position. |