|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Stephane Leger
|
Feb 18, 2010 - 5:46 AM
|
Hi Team, The problem with the docked control bar layout is not fixed in 2.88 when you use a bar from the tabbed document that you change it to the dockable state and it come to floating state (not docked) and than you try to dock it in a sid by side position of an already docked bar, both bars desappear, the layout is not good. If you just resize the MainFrame than the layout is refresh correctly. Thanks. Stephane. P.S. I reproduce the problem with your SDI_DynamicBars sample.
|
|
Technical Support
|
Feb 18, 2010 - 1:54 PM
|
It looks like we fixed this issue. Please update the source code for the following method:
// dock control bar relatively to other control bar using
// space percent specification (extended version)
bool CExtControlBar::DockControlBarLTRB(
int nPercentToOccupy, // greater than zero and less than one hundred
CExtControlBar * pBarTarget,
UINT nDockBarID, // = AFX_IDW_DOCKBAR_BOTTOM
bool bRecalcLayout // = true
)
{
ASSERT_VALID( this );
ASSERT_KINDOF( CExtControlBar, this );
ASSERT_VALID( pBarTarget );
ASSERT_KINDOF( CExtControlBar, pBarTarget );
ASSERT_DOCKBAR_DLGCTRLID_DOCKED( nDockBarID );
ASSERT_VALID( pBarTarget->m_pDockBar );
ASSERT_KINDOF( CDockBar, pBarTarget->m_pDockBar );
ASSERT( ! IsFixedMode() );
ASSERT( ! pBarTarget->IsFixedMode() );
ASSERT( 0 < nPercentToOccupy && nPercentToOccupy < 100 );
#ifdef _DEBUG
if( m_pDockBar != NULL )
{
ASSERT_VALID( m_pDockBar );
ASSERT_KINDOF( CDockBar, m_pDockBar );
}
#endif // _DEBUG
CFrameWnd * pParentFrame = GetParentFrame();
CFrameWnd * pDockSite = m_pDockSite;
#if (!defined __EXT_MFC_NO_DOCK_MARKERS)
if( pParentFrame != NULL
&& pParentFrame->IsKindOf( RUNTIME_CLASS(CExtMiniDockFrameWnd) )
&& _DraggingGetBar() == this
&& INT(OnQueryDockingType()) >= INT(__RESIZABLE_DOCKING_TYPE_STUDIO_2005)
)
pParentFrame->ShowWindow( SW_HIDE );
#endif // (!defined __EXT_MFC_NO_DOCK_MARKERS)
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
CExtDynTabControlBar * pTargetTabBar =
pBarTarget->_GetNearestTabbedContainer();
if( pTargetTabBar != NULL )
{
ASSERT_VALID( pTargetTabBar );
pBarTarget = pTargetTabBar;
ASSERT_VALID( pBarTarget->m_pDockBar );
ASSERT_KINDOF( CDockBar, pBarTarget->m_pDockBar );
ASSERT( ! pBarTarget->IsFixedMode() );
} // if( pTargetTabBar != NULL )
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
bool bRecalcDockSite = true;
pParentFrame = pBarTarget->GetParentFrame();
ASSERT_VALID( pParentFrame );
if( pParentFrame != pBarTarget->m_pDockSite
&& (m_pDockSite != NULL && pParentFrame != m_pDockSite )
)
bRecalcDockSite = false;
HWND hWndSrcFrame = NULL;
if( m_pDockSite != NULL )
{
hWndSrcFrame = GetParentFrame()->GetSafeHwnd();
if( hWndSrcFrame == pBarTarget->m_pDockSite->GetSafeHwnd() )
hWndSrcFrame = NULL;
} // if( m_pDockSite != NULL )
pBarTarget->DelayShow( TRUE );
DelayShow( TRUE );
HWND hWndBarTarget = pBarTarget->GetSafeHwnd();
_DisplayingSet( false );
pBarTarget->_DraggingDoDeepHalfSplit(
this,
nDockBarID,
nPercentToOccupy
);
_DisplayingSet( false );
bRecalcLayout = bRecalcDockSite = true;
if( bRecalcLayout )
{
ASSERT_VALID( pParentFrame );
pParentFrame->RecalcLayout();
if( hWndSrcFrame != NULL && ::IsWindow(hWndSrcFrame) )
{
CWnd * pWnd = CWnd::FromHandlePermanent( hWndSrcFrame );
if( pWnd != NULL )
{
ASSERT_VALID( pWnd );
CFrameWnd * pFrame =
DYNAMIC_DOWNCAST( CFrameWnd, pWnd );
if( pFrame != NULL )
pFrame->RecalcLayout();
} // if( pWnd != NULL )
} // if( hWndSrcFrame != NULL && ::IsWindow(hWndSrcFrame) )
if( bRecalcDockSite
&& ::IsWindow( hWndBarTarget )
)
pBarTarget->m_pDockSite->RecalcLayout();
} // if( bRecalcLayout )
CExtControlBar::stat_AdjustOccCompatibilityTree( pDockSite );
return true;
}
|
|