- 博客(0)
- 资源 (3)
空空如也
右键菜单(支持快捷键)
一般般的程序,大虾们见笑了
void CMainFrame::OnTestZw()
{
// TODO: Add your command handler code here
CClientDC DC(this);
DC.TextOut(400,400,"鼠标右键");
}
void CMainFrame::OnTestYw()
{
// TODO: Add your command handler code here
CClientDC DC(this);
DC.TextOut(100,100,"right click");
}
void CMainFrame::OnContextMenu(CWnd* pWnd, CPoint point)
{
// TODO: Add your message handler code here
CMenu menu;
if (menu.LoadMenu(IDR_MAINFRAME))
{
CMenu* pPopup = menu.GetSubMenu(2);
pPopup->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON,point.x, point.y, this);
}
menu.DestroyMenu();
}
2009-02-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人