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.
Subject |
Author |
Date |
|
Pablo van der Meer
|
Jan 3, 2006 - 11:39 AM
|
Is there an easy way to give the CExtToolBoxWnd control the (final) Visual Studio 2005 look (gradient group headers)? Or are there any plans to implement this feature?
|
|
Technical Support
|
Jan 4, 2006 - 11:51 AM
|
To change the background of any toolbox item, just override the following virtual method in your CExtToolBoxWnd -derived class: void CExtToolBoxWnd::OnToolBoxWndEraseItem(
CExtToolBoxWnd::TOOLBOX_ITEM_DATA * pTBCI,
const CRect & rcItem,
CDC & dc
) You can use the following code to detect whether the pTBCI parameter specifies a group caption item: bool bGroupBackground = false;
TOOLBOX_ITEM_DATA * pTBCI_Parent =
pTBCI->ItemGetNext( __TBCGN_PARENT );
ASSERT( pTBCI_Parent );
if( pTBCI_Parent->ItemGetNext( __TBCGN_PARENT ) == NULL )
bGroupBackground = true; So, if the bGroupBackground variable is true , then you should draw your custom gradient background using dc and rcItem . Otherwise, simply call the parent method.
|
|