我要实现选中点击的行时(我是在对话框上了建立了一个gridctrl控件)
弹出右键菜单,用以下消息相应函数实现,请问该如何做?
afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/);能否提供可以运行的程序源代码?非常感谢
弹出右键菜单,用以下消息相应函数实现,请问该如何做?
afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/);能否提供可以运行的程序源代码?非常感谢
menu.LoadMenu(IDR_MENU_ALARM);
CMenu *pMenu = (CMenu *)menu.GetSubMenu(0);
CPoint pt;
GetCursorPos(&pt);
pMenu->TrackPopupMenu(TPM_LEFTALIGN,pt.x,pt.y,this);