Represents a popup (context) menu.
More...
#include <PopupMenu.h>
|
| PopupMenu () |
| Constructs an empty PopupMenu.
|
virtual | ~PopupMenu () |
| Virtual destructor to clean up resources.
|
void | addItem (long actionId, const wstring &text) |
| Adds a regular menu item.
|
void | addSeparator () |
| Adds a separator item to the menu.
|
long | showMenu (WinHandle hWnd, long x, long y) |
| Displays the popup menu at the specified screen coordinates.
|
Represents a popup (context) menu.
◆ PopupMenu()
◆ ~PopupMenu()
virtual PopupMenu::~PopupMenu |
( |
| ) |
|
|
virtual |
Virtual destructor to clean up resources.
◆ addItem()
void PopupMenu::addItem |
( |
long | actionId, |
|
|
const wstring & | text ) |
Adds a regular menu item.
- Parameters
-
actionId | Action identifier associated with this menu item. |
text | Display text for the menu item. |
◆ addSeparator()
void PopupMenu::addSeparator |
( |
| ) |
|
Adds a separator item to the menu.
◆ showMenu()
long PopupMenu::showMenu |
( |
WinHandle | hWnd, |
|
|
long | x, |
|
|
long | y ) |
Displays the popup menu at the specified screen coordinates.
- Parameters
-
hWnd | Handle to the owner window. |
x | X coordinate (screen pixels) where the menu should appear. |
y | Y coordinate (screen pixels) where the menu should appear. |
- Returns
- long The actionId of the selected menu item, or -1 if no selection.
The documentation for this class was generated from the following file: