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


C++ CDockBar::Create方法代码示例

本文整理汇总了C++中CDockBar::Create方法的典型用法代码示例。如果您正苦于以下问题:C++ CDockBar::Create方法的具体用法?C++ CDockBar::Create怎么用?C++ CDockBar::Create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDockBar的用法示例。


在下文中一共展示了CDockBar::Create方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: BarsDocking

void CGuiDocBarExten::BarsDocking(CFrameWnd * pFrame, DWORD dwDockStyle) 
{
	ASSERT_VALID(pFrame);

	// must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
	ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);

	pFrame->EnableDocking(dwDockStyle);

	for (int i = 0; i < 4; i++) {
		if (dwDockBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY) {
			CDockBar* pDock = (CDockBar*)pFrame->GetControlBar(dwDockBarMap[i][0]);
			if( pDock == 0 || ! pDock->IsKindOf(RUNTIME_CLASS(CGuiDocBarExten)) ) {
				BOOL bNeedDelete = ! pDock->m_bAutoDelete;
				pDock->m_pDockSite->RemoveControlBar(pDock);
				pDock->m_pDockSite = 0;	
				pDock->DestroyWindow();
				if( bNeedDelete )
					delete pDock;
				pDock = 0;
			}

			if( pDock == 0 ) {
				pDock = new CGuiDocBarExten;
				ASSERT_VALID(pDock);
				if ((!pDock) || (!pDock->Create(pFrame,
					WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
						dwDockBarMap[i][1], dwDockBarMap[i][0]))) {
					AfxThrowResourceException();
				}
			}
		}
	}
}
开发者ID:neil-yi,项目名称:ffsource,代码行数:34,代码来源:GuiDocBarExten.cpp

示例2: EnableDocking

// dock bars will be created in the order specified by dwMRCDockBarMap
// this also controls which gets priority during layout
// this order can be changed by calling EnableDocking repetitively
// with the exact order of priority
//------------------------------------------------------------------------------
void CMRCFrameWndSizeDock::EnableDocking(DWORD dwDockStyle, CRuntimeClass *pFloatingClass)
// This is over-ridden primarily because we need to insert our own CDockBar class
// to handle the recalc layout, and this is the place they are created.
//------------------------------------------------------------------------------
{
	// must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
    ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);

    m_pFloatingFrameClass = pFloatingClass; // protected member
    for (int i = 0; i < 4; i++)
    {
    	if (dwMRCDockBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY)          // protected
        {
        	CDockBar* pDock = (CDockBar*)GetControlBar(dwMRCDockBarMap[i][0]);
            if (pDock == NULL)
            	{
                	pDock = new CSizeDockBar;
                    if (!pDock->Create(this,
						               WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
                                              dwMRCDockBarMap[i][1], dwMRCDockBarMap[i][0]))
                    {
                    	AfxThrowResourceException();
                    }
                }
        }
    }
}
开发者ID:Joincheng,项目名称:lithtech,代码行数:32,代码来源:FRAMEWND.CPP

示例3: EnableDocking

void CFrameWnd::EnableDocking( DWORD dwDockStyle )
/************************************************/
{
    for( int i = 0; i < NUM_DOCKBARS; i++ ) {
        DWORD dwBarDockStyle = _DockBarInfo[i][1];
        if( dwDockStyle & dwBarDockStyle ) {
            CDockBar *pDockBar = (CDockBar *)GetControlBar( _DockBarInfo[i][1] );
            if( pDockBar == NULL ) {
                pDockBar = new CDockBar;
                pDockBar->Create( this, WS_CHILD | WS_VISIBLE | _DockBarInfo[i][1],
                                  _DockBarInfo[i][0] );
            }
        }
    }
}
开发者ID:ArmstrongJ,项目名称:open-watcom-v2,代码行数:15,代码来源:framewnd.cpp

示例4: EnableDocking

// dock bars will be created in the order specified by dwDockBarMap
// this also controls which gets priority during layout
// this order can be changed by calling EnableDocking repetitively
// with the exact order of priority
void CFrameWnd::EnableDocking(DWORD dwDockStyle)
{
	// must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
	ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);

	m_pFloatingFrameClass = RUNTIME_CLASS(CMiniDockFrameWnd);
	for (int i = 0; i < 4; i++)
	{
		if (dwDockBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY)
		{
			CDockBar* pDock = (CDockBar*)GetControlBar(dwDockBarMap[i][0]);
			if (pDock == NULL)
			{
				pDock = new CDockBar;
				if (!pDock->Create(this,
					WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
						dwDockBarMap[i][1], dwDockBarMap[i][0]))
				{
					AfxThrowResourceException();
				}
			}
		}
	}
}
开发者ID:rickerliang,项目名称:OpenNT,代码行数:28,代码来源:winfrm2.cpp


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