CMenu::TrackPopupMenu

Call this member function to display a floating pop-up menu at the specified location, and track the selection of items on the pop-up menu.

Syntax

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

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

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 can't specify the TPM_LEFTBUTTON or TPM_RIGHTBUTTON flags in the nFlags parameter.

See Also

CMenu Overview, CMenu Member Functions, Menu Classes, CMenu::CreatePopupMenu, CMenu::GetSubMenu