菜单

femalelover 2005-12-27 06:33:05
比方说,在资源管理器,任选中一个文件,右键单击,会弹出一个菜单.
我听一位大佬说这个菜单是系统定制的,
我想问的是,怎么样才能调用这个菜单呢?
可能是MSDN版本的原因,找了很久也没有找到.
...全文
213 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
femalelover 2005-12-27
  • 打赏
  • 举报
回复
我不是要自已的,是要系统的那个呀,上面我说了呀,就是那个有"复制","剪切","重命名","打开"等菜单项的菜单呢.
femalelover 2005-12-27
  • 打赏
  • 举报
回复
啊?!就是这个?
第一个参数怎么取呢,这可是个比较特殊的菜单呢.
zwl327 2005-12-27
  • 打赏
  • 举报
回复
CDialog::OnRButtonUp(nFlags, point);
GetCursorPos(&point);
CMenu menu;
VERIFY( menu.LoadMenu( IDR_MENU1 ) );
CMenu* popup = menu.GetSubMenu(0);
ASSERT( popup != NULL );
popup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this );


// IDR_MENU1 为在工作区resource中自己做的一个菜单,
ywfscu 2005-12-27
  • 打赏
  • 举报
回复
The TrackPopupMenu function displays a shortcut menu at the specified location and tracks the selection of items on the menu. The shortcut menu can appear anywhere on the screen.

BOOL TrackPopupMenu(
HMENU hMenu, // handle to shortcut menu
UINT uFlags, // screen-position and mouse-button flags
int x, // horizontal position, in screen coordinates
int y, // vertical position, in screen coordinates
int nReserved, // reserved, must be zero
HWND hWnd, // handle to owner window
CONST RECT *prcRect // ignored
);

15,980

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧