Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function displays a floating pop-up menu at the specified location and tracks the selection of items on the pop-up menu. The floating pop-up menu can appear anywhere on the screen.
BOOL TrackPopupMenuEx( HMENU hmenu , UINT uFlags , int x , int y , HWND hwnd , LPTPMPARAMS lptpm );
Parameters
Return Values
If you specify TPM_RETURNCMD in the uFlagsparameter, the return value is the menu-item identifier of the item that the user selected. If the user cancels the menu without making a selection, or if an error occurs, then the return value is zero.
If you do not specify TPM_RETURNCMD in the uFlagsparameter, the return value is nonzero if the function succeeds and zero if it fails. To get extended error information, call GetLastError.
Remarks
For Windows CE versions 1.0 and 1.01, the lptpmparameter is not supported and must be set to NULL. This parameter is supported in versions 2.0 and later.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h | Menu.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
CreatePopupMenu, GetSubMenu, TPMPARAMS, TrackPopupMenu, WM_COMMAND