本文整理汇总了C++中CN3UIBase::GetRegion方法的典型用法代码示例。如果您正苦于以下问题:C++ CN3UIBase::GetRegion方法的具体用法?C++ CN3UIBase::GetRegion怎么用?C++ CN3UIBase::GetRegion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CN3UIBase
的用法示例。
在下文中一共展示了CN3UIBase::GetRegion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CN3UIBase::ResizeAutomaticalyByChild()
{
if(m_Children.empty()) return;
RECT rcMax = { 100000000, 100000000, -100000000, -100000000 };
int iIndex = 0;
for(UIListItor itor = m_Children.begin(); m_Children.end() != itor; itor++, iIndex++)
{
CN3UIBase* pChild = (*itor);
RECT rcTmp = pChild->GetRegion();
if(rcTmp.left < rcMax.left) rcMax.left = rcTmp.left;
if(rcTmp.top < rcMax.top) rcMax.top = rcTmp.top;
if(rcTmp.right > rcMax.right) rcMax.right = rcTmp.right;
if(rcTmp.bottom > rcMax.bottom) rcMax.bottom = rcTmp.bottom;
}
RECT rcCur = this->GetRegion();
if(rcCur.left > rcMax.left) rcCur.left = rcMax.left;
if(rcCur.top > rcMax.top) rcCur.top = rcMax.top;
if(rcCur.right < rcMax.right) rcCur.right = rcMax.right;
if(rcCur.bottom < rcMax.bottom) rcCur.bottom = rcMax.bottom;
// this->SetRegion(rcCur);
m_rcRegion = rcCur; // SetRegion을 해버리면 child의 영역을 바꿔버리는 경우가 있으므로 내 영역만 바꾸기위해 직접 넣는다.
}