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 » Problem with chevron button in floating toolbar Collapse All
Subject Author Date
Piotr C. Mar 5, 2007 - 5:36 PM

I’d like to have a toolbar without the chevron button. I have created class derived from CExtToolControlBar and overrided CExtToolControlBar::OnCreateBarRightBtn() method. Everything works fine when toolbar is docked - there is no chevron, but it is visible when the toolbar is in floating state. What I did wrong?

Thanks,
Piotr

Technical Support Mar 6, 2007 - 9:35 AM

Additionally you should turn off the menu button in the control bar’s caption. So your overridden version of OnNcAreaButtonsReinitialize() may look like as follows.

void CExtControlBar::OnNcAreaButtonsReinitialize()
{
	ASSERT_VALID( this );
	INT nCountOfNcButtons = NcButtons_GetCount();
	if( nCountOfNcButtons > 0 )
		return;
	NcButtons_Add( new CExtBarNcAreaButtonClose(this) );
	#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
		NcButtons_Add( new CExtBarNcAreaButtonAutoHide(this) );
	#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)

	// THESE THREE LINES SHOULD BE COMMENTED OUT
	// NcButtons_Add( new CExtBarNcAreaButtonExpand(this) ); 
	// NcButtons_Add( new CExtBarNcAreaButtonMenu(this) );
	// NcButtons_Add( new CExtBarNcAreaButtonFloatingMaximizeRestore(this) );
}

Piotr C. Mar 6, 2007 - 3:59 PM

Thanks for your help. Now it works fine!

Piotr