
| Last Modification: February 25, 2000 |
How can I remove the X (close) button on a floating toolbar?
Derive your toolbar from CToolbar and override CalcFixedLayout(), like this:
CSize CMyToolBar::CalcFixedLayout( BOOL bStretch, BOOL bHorz )
{
if ( IsFloating() ) // only when we float
GetParent()->GetParent()->ModifyStyle( WS_SYSMENU, 0 );
return CToolBar::CalcFixedLayout( bStretch, bHorz );
}