
if (point.x == -1 && point.y == -1)什么意思
voidCMenuView::OnContextMenu(CWnd*,CPointpoint){//CG:ThisblockwasaddedbythePop-upMenu...
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)这个干吗呢? 展开
{
// 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)这个干吗呢? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询