响应控件所在窗口的On
void CGVideoDlg::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
{
// TODO: 在此处添加消息处理程序代码
CRect rect;
GetDlgItem(IDC_PLAYER)->GetWindowRect(&rect);
if (rect.PtInRect(point))
{
CMenu menu;
VERIFY(menu.LoadMenuW(IDR_MENU1));
CMenu *pPopup = menu.GetSubMenu(0);
ASSERT(pPopup != NULL);
pPopup->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON, point.x, point.y, this);
}
}