if (point.x == -1 && point.y == void CMenuView::OnContextMenu(CWnd*,CPoint point){// CG:This block was added by the Pop-up Menu component{if (point.x == -1 && point.y == -1){//keystroke invocationCRect rect;GetClientRect(rect);ClientToScreen(rect);point = rect.TopLeft();point.Offset(5,5);}mfc里右键菜单设置,这个好像是把界面坐标转化为屏幕坐标,但是if (point.x == -1 && point.y == -1)这个干吗呢?

问题描述:

if (point.x == -1 && point.y ==
void CMenuView::OnContextMenu(CWnd*,CPoint point)
{
// CG:This block was added by the Pop-up Menu component
{
if (point.x == -1 && point.y == -1){
//keystroke invocation
CRect rect;
GetClientRect(rect);
ClientToScreen(rect);
point = rect.TopLeft();
point.Offset(5,5);
}
mfc里右键菜单设置,这个好像是把界面坐标转化为屏幕坐标,但是if (point.x == -1 && point.y == -1)这个干吗呢?