|
|
|
|
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 |
|
Sebastian Leopold
|
Feb 13, 2006 - 6:24 AM
|
Hello,
I’ve created to Controlbars and have docked it on the right side. That is my Code for Doing that:
Creating:
m_wndPropertyBar.SetInitDesiredSizeHorizontal(CSize(200,700)); m_wndPropertyBar.SetInitDesiredSizeVertical(CSize(230,0)); if(!m_wndPropertyBar.Create(_T("Eigenschaften"),this,ID_VIEW_PROPERTYBAR)) { TRACE0("Einstellungsleiste konnte nicht erstellt werden"); return -1; }
if(!m_wndPropertyDlgPage.Create(CPageProperties::IDD,&m_wndPropertyBar)) { TRACE0("Fehler beim erstellen der Propertieseite ohne Propertysheet"); return -1; }
// Erstellen der Realtimeleiste m_wndRealtimeBar.SetInitDesiredSizeHorizontal(CSize(200,200)); m_wndRealtimeBar.SetInitDesiredSizeVertical(CSize(232,0)); if(!m_wndRealtimeBar.Create(_T("Realtimemodus"),this,ID_VIEW_REALTIMEBAR)) { TRACE0("Realtimeleiste konnte nicht erstellt werden"); return -1; } if(!m_wndRealtimeDlgPage.Create(CPageRealtimeMode::IDD,&m_wndRealtimeBar)) { TRACE0("Fehler beim erstellen der Realtimemodeseite"); return -1; }
Docking:
m_wndPropertyBar.DockControlBar( AFX_IDW_DOCKBAR_RIGHT, 1, this, false); m_wndPropertyBar.DockControlBar(&m_wndRealtimeBar,true,false,this,true);
At the moment each bar got 50 % of the Space but I want that the Realtimebar has the size of it’s inner Dialog. I dont understand how this two methods work:
m_wndRealtimeBar.SetInitDesiredSizeHorizontal(CSize(200,200)); m_wndRealtimeBar.SetInitDesiredSizeVertical(CSize(232,0));
I hope you can Help me :(
|
|
Technical Support
|
Feb 13, 2006 - 11:11 AM
|
The CExtControlBar::DockControlBar() methods are left in the source code for compatibility with older Prof-UIS versions. Please use the following new methods to specify the control bar sizes during the initial docking: m_wndPropertyBar.DockControlBarInnerOuter( AFX_IDW_DOCKBAR_RIGHT, true );
m_wndRealtimeBar.DockControlBarLTRB( 30, &m_wndPropertyBar, AFX_IDW_DOCKBAR_BOTTOM ); The first line docks the m_wndPropertyBar bar into a newly allocated column of bars in the right inner part of the main frame window. The second line docks the m_wndRealtimeBar bar into the same column with the m_wndPropertyBar bar. The value 30 means the m_wndRealtimeBar bar occupies 30% of the m_wndPropertyBar bar from bottom. The CExtControlBar::SetInitDesiredSize...() methods allow you to set the desired size for any control bar when it is single in a row/column or it is floating. In this case, it cannot affect the size of any othet bar, hence the desired size can really be set.
|
|