16,472
社区成员
发帖
与我相关
我的任务
分享
void CMainFrame::OnContextMenu(CWnd* pWnd, CPoint point)
{
// TODO: ここにメッセージ ハンドラー コードを追加します。
static char myfun[]="CMainFrame::OnContextMenu";
CobTrace0(myfun,"(I) CPoint point");
if (pWnd==NULL)
{
CobError0(myfun,"(E) pWnd == NULL");
return;
}
CRect rect;
GetWindowRect(&rect);
rect.top += 35;
SetTrackMenu();
CMenu menu;
menu.Attach(m_TrackMenu.GetSubMenu(0)->GetSafeHmenu());
if(rect.PtInRect(point))
{
menu.TrackPopupMenu(TPM_LEFTBUTTON | TPM_LEFTALIGN, point.x, point.y, this, NULL);
}
menu.Detach();
CobTrace0(myfun,"[end]");
}