本文整理汇总了C++中MCStack::constrain方法的典型用法代码示例。如果您正苦于以下问题:C++ MCStack::constrain方法的具体用法?C++ MCStack::constrain怎么用?C++ MCStack::constrain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCStack
的用法示例。
在下文中一共展示了MCStack::constrain方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MCWindowProc
//.........这里部分代码省略.........
break;
case WM_SIZE:
{
MCStack *target = MCdispatcher->findstackd(dw);
if (target != NULL)
{
if (wParam == SIZE_MINIMIZED)
target->iconify();
else
if (target->isiconic())
{
MCstacks->restack(target);
target->view_configure(true);
target->uniconify();
SetWindowPos((HWND)target -> getwindow() -> handle . window, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
}
else
target->view_configure(true);
curinfo->handled = True;
}
}
break;
case WM_MOVE:
MCdispatcher->configure(dw);
curinfo->handled = True;
break;
case WM_CLOSE:
MCdispatcher->wclose(dw);
curinfo->handled = True;
break;
case WM_GETMINMAXINFO:
target = MCdispatcher->findstackd(dw);
if (target != NULL)
target->constrain(lParam);
break;
case WM_ERASEBKGND:
break;
case WM_TIMER:
curinfo->handled = True;
if (MCmousestackptr != NULL && MCdispatcher->getmenu() == NULL)
{
int2 x, y;
pms->querymouse(x, y);
MCRectangle rect;
if (pms->getwindowgeometry(MCmousestackptr->getw(), rect)
&& capturehwnd == NULL && !pms->getgrabbed()
&& !MCU_point_in_rect(rect, x, y))
{
MCmousestackptr->munfocus();
MCmousestackptr = NULL;
}
}
break;
case WM_CANCELMODE:
if (pms->isgrabbed())
{
buffer[0] = 0x1B;
buffer[1] = '\0';
Boolean oldlock = MClockmessages;
MClockmessages = True;
MCdispatcher->wkdown(dw, buffer, XK_Escape);
MCdispatcher->wkup(dw, buffer, XK_Escape);
MClockmessages = oldlock;
curinfo->handled = True;
pms->setgrabbed(False);
MCmousex = MCmousey = -1; // prevent button msg from reopening menu