Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS Tech Support » Prof-UIS 2.88 CExtControlBar::DockControlBarLTRB(...) dont work as expected Collapse All
Subject Author Date
Jens Oehler Mar 19, 2010 - 2:23 PM

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

Technical Support Mar 22, 2010 - 1:17 PM

We successfully reproduced this issue. Thank you. It’s fixed in the latest Prof-UIS 2.89 pre-release version. Please drop us an e-mail to the support mail box at this web site so we will provide you with the source code update.

Jens Oehler Mar 20, 2010 - 2:15 PM

In our software we only use CExtControlBar::DockControlBarInnerOuter() for the first bar to dock. For all other control bars we use  CExtControlBar::DockControlBarLTRB(). With Prof-UIS 2.84 the control bars are docked with the given percentage, given in the nPercentToOccupy parameter. With version 2.88 this is broken. Every docked bar splits his parent in equal sizes and the nPercentToOccupy parameter are not working.


    


 

Technical Support Mar 20, 2010 - 11:17 AM

The CExtControlBar::DockControlBar() is provided for backward compatibility with very old Prof-UIS versions so you should not use it. Please use the CExtControlBar::DockControlBarInnerOuter() method instead so the CExtControlBar::DockControlBarLTRB() method’s nPercentToOccupy parameter can affect the size of control bars.