【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.6.20.21 Menu::TrackPopupResMenu
Contents
Description
Displays a floating pop-up menu at the specified location and tracks the selection of items on the pop-up menu. A floating pop-up menu can appear anywhere on the screen. call this member for resource menu, which are created from resource.
Syntax
int TrackPopupResMenu( UINT nFlags, int x, int y, HWND hwnd )
Parameters
- nFlags
- Specifies a screen-position flag and a mouse-button flag. The screen-position flag can be one of the following:
- TPM_CENTERALIGN Centers the pop-up menu horizontally relative to the coordinate specified by x.
- TPM_LEFTALIGN Positions the pop-up menu so that its left side is aligned with the coordinate specified by x.
- TPM_RIGHTALIGN Positions the pop-up menu so that its right side is aligned with the coordinate specified by x.
- The mouse-button flag can be either of the following:
- TPM_LEFTBUTTON Causes the pop-up menu to track the left mouse button.
- TPM_RIGHTBUTTON Causes the pop-up menu to track the right mouse button.
- x
- Specifies the horizontal position in screen coordinates of the pop-up menu.
- y
- Specifies the vertical position in screen coordinates of the top of the menu on the screen.
- hwnd
- handle to the owner window
Return
returns the return value of the handler function, if handled else false
Examples
Remark
See Also
Header to Include
Control.h