VC++2008添加右键弹出菜单

来源:百度知道 编辑:UC知道 时间:2024/05/31 07:14:50
请问如何在MFC里添加右键弹出菜单。

BOOL TrackPopupMenu(
HMENU hMenu, // handle to shortcut menu
UINT uFlags, // options
int x, // horizontal position
int y, // vertical position
int nReserved, // reserved, must be zero
HWND hWnd, // handle to owner window
CONST RECT *prcRect // ignored
);

首先添加菜单资源,然后响应鼠标右键消息,探出菜单,然后做你想做的