为VIEW 类添加RBUTTONDOWN消息处理 ,添加菜单资源
void CTestView::OnRButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CMenu menu;
menu.LoadMenu(IDR_MENU1);
CMenu *pPopup = menu.GetSubMenu(0);
ClientToScreen(&point);
pPopup->TrackPopupMenu(TPM_LEFTALIGN |TPM_LEFTBUTTON,point.x,point.y,this);
menu.Detach();
CView::OnRButtonDown(nFlags, point);
}