当前位置: 首页>>代码示例>>C++>>正文


C++ CExtControlBar::CalcDynamicLayout方法代码示例

本文整理汇总了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;
}
开发者ID:ngphloc,项目名称:agmagic,代码行数:101,代码来源:ExtMiniDockFrameWnd.cpp


注:本文中的CExtControlBar::CalcDynamicLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。