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 » CExtControlBar ASSERT Collapse All
Subject Author Date
William Keadey Mar 10, 2005 - 5:20 AM

I have a CExtControlBar derived class that has four CExtButtons displayed.  When I hide docking window and then display the docking window the following hightlighted section of code asserts in the WinProc of the CExtControlBar


LRESULT CExtControlBar::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)


{


...


case WM_SETFOCUS:


{


LRESULT lResult =


CControlBar::WindowProc(message, wParam, lParam);


if( IsMinimizedOnRow() )


MaximizeOnRow();


if( !IsFixedMode() )


{


CWnd* pWnd = GetWindow(GW_CHILD);


if(pWnd != NULL)


{


pWnd->SetFocus();


#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)


ASSERT(


pWnd->GetWindow(GW_HWNDNEXT) == NULL


|| IsKindOf(RUNTIME_CLASS(CExtDynTabControlBar))


);


#else


ASSERT(


pWnd->GetWindow(GW_HWNDNEXT) == NULL


);


#endif // else from (!defined __EXT_MFC_NO_TAB_CONTROLBARS)


}


} // if( !IsFixedMode() )


return lResult;


...


}


 


 

Technical Support Mar 10, 2005 - 11:16 AM

The resizable control bar is designed to keep only one child window inside. So it’s wrong to create several windows inside CExtControlBar and that’s why you encountered the assertion. Please create a child dialog with buttons and then use it as a child window of the resizable control bar.