win32 右键弹出菜单

#define  CW_ABOUT  100
#define  CW_DOCUMENT 200

POINT t;
GetCursorPos(&t);
HMENU hMenu,hPopupMenu;
hMenu=CreatePopupMenu();
hPopupMenu=CreatePopupMenu();
AppendMenu(hMenu,MF_STRING,CW_ABOUT,"复制");
AppendMenu(hPopupMenu,MF_STRING,CW_DOCUMENT,"删除(&D)");
InsertMenu(hMenu,1,MF_BYPOSITION|MF_STRING|MF_POPUP,(unsigned short)hPopupMenu,"清空");
TrackPopupMenu(hMenu,TPM_TOPALIGN,t.x,t.y,0,::GetFocus(),0);

上一篇:xcode升级或者重新安装后不能编译的解决方法


下一篇:在唱歌比赛中,有6名评委给选手打分,分数范围是[0 - 100]之间的整数。选手的最后得分为:去掉最高分、最低分后的4个评委的平均分,请完成上述过程并计算出选手的得分。