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 » Initial Display with a Dynamic Control Bar Collapse All
Subject Author Date
Bill Olson Sep 25, 2010 - 3:33 AM



I need to dock a control bar inside an MDI child window.  I created a dialog to go on the new control bar and docked it to the frame.  Initially the control bar is visible, but the dialog is not (the control bar is blank).  If I click on the push pin, the bar becomes collapsible and the dialog becomes visible.  The dialog is visible from then on, even if the bar is made fixed again by clicking the push pin again.



I started with the MDI_DynamicInnerOuterBar sample.  I generated the docked bar the same way it was done in the sample except I called CreateInsideBar which is pretty much the same as the function defined in the Skinable sample.



bool CSwRight::CreateInsideBar(CExtControlBar * pBar)

{

    ASSERT_VALID( this );

    ASSERT_VALID( pBar );

    ASSERT( GetSafeHwnd() == NULL );

    ASSERT( pBar->GetSafeHwnd() != NULL );

    if( ! CExtResizableDialog::Create( IDD, pBar ) )

        return false;

    return true;

}



How do I make the dialog show initially when in the regular docked state?  I figure I must be missing something simple.



Bill

Technical Support Sep 25, 2010 - 8:06 AM

Please check the following: the dialog template resource should be marked as the child type and visible. If the CSwRight::CreateInsideBar() can be invoked dynamically at run time, then please invoke the fillowing line of code before returning the true flag:

    pBar->OnRepositionSingleChild();

Bill Olson Sep 28, 2010 - 1:50 AM

That did it.  For some reason the dialog template was set to invisible.


Thanks,


Bill