CMenu::TrackPopupMenu

This method displays a floating pop-up menu at the specified location, and track the selection of items on the pop-up menu.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

BOOL TrackPopupMenu ( UINT nFlags, int x, int y, CWnd* pWnd,
LPCRECT
lpRect = 0 );

Remarks

In Windows CE, the parameter lpRect must be NULL. The pop-up menu is dismissed if the user clicks outside the pop-up menu.

Because there are no left or right mouse buttons to track, you cannot specify the TPM_LEFTBUTTON or TPM_RIGHTBUTTON flags in the nFlags parameter.

See Also

CMenu::CreatePopupMenu, CMenu::GetSubMenu