::OnContextMenu(CWnd* pWnd, CPoint point)
{
CMenu menuPopup;
menuPopup.CreatePopupMenu();menuPopup.AppendMenu(0,ID_TEST1,"test1");
menuPopup.AppendMenu(0,ID_TEST2,"test2");
menuPopup.TrackPopupMenu(TPM_LEFTALIGN,point.x,point.y,this);
menuPopup.DestroyMenu();
}
//
//
IDR_MENU1自己建立的menu加载上去
{ CMenu menu;
menu.LoadMenu(IDR_MENU1);
CMenu *pop = menu.GetSubMenu(0);
pop->TrackPopupMenu(TPM_LEFTALIGN,point.x,point.y,this);
}