Dear Technical Support,
in the Version 2.88 the
bool CExtControlBar::DockControlBarLTRB(
int nPercentToOccupy, // greater then zero and less then one hundred
CExtControlBar * pBarTarget,
UINT nDockBarID, // = AFX_IDW_DOCKBAR_BOTTOM
bool bRecalcLayout // = true
)
seems not working as decribed.
It looks that the nPercentToOccupy
parameter doesn´t have effect. All the bars docked with this function are splitted by 50%.
You can easiely produce this problem by using your MDI Sample. I have changed the lines 366-392 in Mainfrm.cpp from
if( ! CExtControlBar::ProfileBarStateLoad(
this,
pApp->m_pszRegistryKey,
pApp->m_pszProfileName,
pApp->m_pszProfileName,
&m_dataFrameWP
)
)
{
DockControlBar( &m_wndMenuBar );
DockControlBar( &m_wndToolBar );
DockControlBar( &m_wndToolBarUiLook, AFX_IDW_DOCKBAR_RIGHT );
m_wndResizableBar0.SetInitDesiredSizeVertical( CSize( 120, 120 ) );
m_wndResizableBar1.SetInitDesiredSizeHorizontal( CSize( 120, 120 ) );
m_wndResizableBar2.SetInitDesiredSizeVertical( CSize( 120, 120 ) );
m_wndResizableBar3.SetInitDesiredSizeHorizontal( CSize( 120, 120 ) );
m_wndResizableBar4.SetInitDesiredSizeVertical( CSize( 120, 120 ) );
m_wndResizableBar0.DockControlBar( AFX_IDW_DOCKBAR_LEFT, 1, this, true );
m_wndResizableBar1.DockControlBarLTRB( 50, &m_wndResizableBar0, AFX_IDW_DOCKBAR_BOTTOM, true );
m_wndResizableBar3.DockControlBar( AFX_IDW_DOCKBAR_BOTTOM, 2, this, false );
m_wndResizableBar2.DockControlBarLTRB( 50, &m_wndResizableBar3, AFX_IDW_DOCKBAR_LEFT, true );
m_wndResizableBar4.DockControlBar( AFX_IDW_DOCKBAR_RIGHT, 1, this, false );
m_wndResizableBarTA.DockControlBar( AFX_IDW_DOCKBAR_RIGHT, 3, this, false );
RecalcLayout();
}
to
/*
if( ! CExtControlBar::ProfileBarStateLoad(
this,
pApp->m_pszRegistryKey,
pApp->m_pszProfileName,
pApp->m_pszProfileName,
&m_dataFrameWP
)
)
*/
{
DockControlBar( &m_wndMenuBar );
DockControlBar( &m_wndToolBar );
DockControlBar( &m_wndToolBarUiLook, AFX_IDW_DOCKBAR_RIGHT );
m_wndResizableBar0.SetInitDesiredSizeVertical( CSize( 120, 120 ) );
m_wndResizableBar1.SetInitDesiredSizeHorizontal( CSize( 120, 120 ) );
m_wndResizableBar2.SetInitDesiredSizeVertical( CSize( 120, 120 ) );
m_wndResizableBar3.SetInitDesiredSizeHorizontal( CSize( 120, 120 ) );
m_wndResizableBar4.SetInitDesiredSizeVertical( CSize( 120, 120 ) );
m_wndResizableBar0.DockControlBar( AFX_IDW_DOCKBAR_LEFT, 1, this, true );
m_wndResizableBar1.DockControlBarLTRB( 10, &m_wndResizableBar0, AFX_IDW_DOCKBAR_BOTTOM, true );
m_wndResizableBar3.DockControlBar( AFX_IDW_DOCKBAR_BOTTOM, 2, this, false );
m_wndResizableBar2.DockControlBarLTRB( 90, &m_wndResizableBar3, AFX_IDW_DOCKBAR_LEFT, true );
m_wndResizableBar4.DockControlBar( AFX_IDW_DOCKBAR_RIGHT, 1, this, false );
m_wndResizableBarTA.DockControlBar( AFX_IDW_DOCKBAR_RIGHT, 3, this, false );
RecalcLayout();
}
Both produce the same layout on the user interface. Playing with the percentage in the function calls doesn’t shows changes.
Regards
Jens