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 General Discussion » Assertion in extcontrolbar.cpp when ProfileBarStateLoad() is called Collapse All
Subject Author Date
Thomas Hoegg Mar 17, 2004 - 11:12 AM

Hallo!


Your library is great. So i try to use the trial version of it and then I’d like to buy the commercial! But there is a problem in my test-application! I used the following code:


if( !CExtControlBar::FrameEnableDocking(this) )
{
     ASSERT( FALSE );


return -1;


}


if( !CExtControlBar::FrameInjectAutoHideAreas(this) )


{


ASSERT( FALSE );


return -1;


}

Thomas Hoegg Mar 17, 2004 - 11:27 AM

Hallo!



Your library is great. So i try to use the trial version of it and then I’d like to buy the commercial! But there is a problem in my test-application! I used the following code:



if( !CExtControlBar::FrameEnableDocking(this) )
{
ASSERT( FALSE );
return -1;
}



if( !CExtControlBar::FrameInjectAutoHideAreas(this) )
{
ASSERT( FALSE );
return -1;
}


...


if( !CExtControlBar::ProfileBarStateLoad(   // <-- Assertion occurs!!!
this,
pApp->m_pszRegistryKey,
pApp->m_pszProfileName,
pApp->m_pszProfileName,
&m_dataFrameWP))
{
DockControlBar( &m_wndMenuBar );
DockControlBar( &m_wndToolBar );
DockControlBar( &m_wndResizableBarEdit, AFX_IDW_DOCKBAR_BOTTOM );
DockControlBar( &m_wndResizableBarTree, AFX_IDW_DOCKBAR_LEFT );
RecalcLayout();
}


How you can see, there are two controlbars created! The first time, when i run my application everything goes fine! But when I switch the controlbars to the autohide-mode, the next time, when I run my application a debug assertins in Line 1954 occurs! Can you please tell me, where the problem could be?? I do not have any ideas!!


Thanks a lot!


Thomas Högg

Technical Support Mar 18, 2004 - 9:06 AM

Dear Thomas,

You use the DockControlBar() method of the CFrameWnd class to set the positions of both toolbars and resizable panels. But this method is only applied to toolbars and menu bars.

The initial position of a resizable bar is set with the CExtControlBar::DockControlBar() and CExtControlBar::DockControlBarIntoTabbedContainer() methods. You may see how to work with them in the ProfStudio sample. You should do something like this:

m_wndResizableBarEdit.DockControlBar
 (AFX_IDW_DOCKBAR_BOTTOM,1,this,false);
m_wndResizableBarTree.DockControlBar
 (AFX_IDW_DOCKBAR_LEFT,1,this,false);

Thomas Hoegg Mar 18, 2004 - 9:57 AM

It seems to work! Thanks a lot for your help!!


Thomas