本文整理汇总了C++中CExtControlBar::CalcDynamicLayout方法的典型用法代码示例。如果您正苦于以下问题:C++ CExtControlBar::CalcDynamicLayout方法的具体用法?C++ CExtControlBar::CalcDynamicLayout怎么用?C++ CExtControlBar::CalcDynamicLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CExtControlBar
的用法示例。
在下文中一共展示了CExtControlBar::CalcDynamicLayout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _ResizingUpdateState
//.........这里部分代码省略.........
rcClient.SetRect(
rcWnd.left - (rcClient.left-rcWndOrg.left),
rcWnd.top - (rcClient.top-rcWndOrg.top),
rcWnd.right - (rcClient.right-rcWndOrg.right),
rcWnd.bottom - (rcClient.bottom-rcWndOrg.bottom)
);
if( !pExtBar->IsFixedMode() )
{
ASSERT( (GetStyle() & __REMOVED_NONFIXMODE_STYLES) == 0 );
CSize _sizeMinFloated =
pExtBar->_CalcDesiredMinFloatedSize();
CSize _size = rcWnd.Size();
if( _size.cx < _sizeMinFloated.cx )
_size.cx = _sizeMinFloated.cx;
if( _size.cy < _sizeMinFloated.cy )
_size.cy = _sizeMinFloated.cy;
CExtPaintManager::monitor_parms_t _mp;
CExtPaintManager::stat_GetMonitorParms( _mp, this );
CSize _sizeMaxFloated = _mp.m_rcWorkArea.Size();
if( _size.cx > _sizeMaxFloated.cx )
_size.cx = _sizeMaxFloated.cx;
if( _size.cy > _sizeMaxFloated.cy )
_size.cy = _sizeMaxFloated.cy;
CRect rcWndValidated( rcWnd.TopLeft(), _size );
pExtBar->m_sizeFloated = _size - ptOffsetWnd;
MoveWindow( &rcWndValidated );
SetTimer( 3, 1, NULL );
g_bInResizingUpdateState = false;
return;
} // if( !pExtBar->IsFixedMode() )
int nWinResizingFrameDX = ::GetSystemMetrics( SM_CXSIZEFRAME );
int nWinResizingFrameDY = ::GetSystemMetrics( SM_CYSIZEFRAME );
DWORD dwMode = LM_HORZ|LM_COMMIT;
LONG nLendth = 0;
if( bHorz )
nLendth = rcClient.Width();
else
{
dwMode |= LM_LENGTHY;
nLendth =
rcClient.Height()
- nWinResizingFrameDY;
} // else from if( bHorz )
CSize _sizeFloatedPrev = pExtBar->m_sizeFloated;
CSize _size =
pExtBar->CalcDynamicLayout( nLendth, dwMode );
if( _sizeFloatedPrev == _size )
{
g_bInResizingUpdateState = false;
return;
}
// if( _size.cx < _sizeMinFloated.cx )
// _size.cx = _sizeMinFloated.cx;
// if( _size.cy < _sizeMinFloated.cy )
// _size.cy = _sizeMinFloated.cy;
pExtBar->m_sizeFloated = _size;
if( bInvTop )
{
ASSERT( rcWnd.top == rcWndOrg.top );
rcWnd.bottom = m_rcWndResizingStart.bottom;
rcWnd.top =
rcWnd.bottom - _size.cy - ptOffsetWnd.y;
}
if( bInvLeft )
{
ASSERT( rcWnd.left == rcWndOrg.left );
rcWnd.right = m_rcWndResizingStart.right;
rcWnd.left =
rcWnd.right - _size.cx - ptOffsetWnd.x;
}
ASSERT( pExtBar->m_pDockSite != NULL );
ASSERT( pExtBar->m_pDockBar != NULL );
pExtBar->m_ptFloatHelper = rcWnd.TopLeft();
_size += sizeNcDiff;
_size.cx -= nWinResizingFrameDX; // (+ v.2.22)
_size.cy -= nWinResizingFrameDY;
CRect rcToMoveMinFrame(
pExtBar->m_ptFloatHelper,
_size
);
MoveWindow( &rcToMoveMinFrame);
SendMessage( WM_NCPAINT );
RecalcLayout();
pExtBar->RedrawWindow(
NULL,
NULL,
RDW_INVALIDATE|RDW_UPDATENOW
|RDW_ERASE|RDW_ERASENOW
|RDW_ALLCHILDREN
);
g_bInResizingUpdateState = false;
}