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 » Horizontal painting background Collapse All
Subject Author Date
Kenan Hrustanovic Apr 12, 2005 - 4:46 PM

Hello dear support team,


is there any simple way to paint CExtToolControlBar’s background horizontal? (For example in case of Office 2003 from left in white to right in blue) if you have any idea to save me from owner painting with CDC, it would be great!


Thanks, Kenan.


 

Technical Support Apr 13, 2005 - 5:38 AM

To repaint the toolbar’s background, create a CExtToolControlBar-derived class and override the following virtual method:

virtual void DoEraseBk(
        CDC * pDC, LPCRECT pRectBk );
The parent window of any dockable toolbar window is always CDockBar and it can be used for analyzing where the toolbar is located:
switch( GetParent()->GetDlgCtrlID() )
{
case AFX_IDW_DOCKBAR_TOP: 
case AFX_IDW_DOCKBAR_BOTTOM: 
case AFX_IDW_DOCKBAR_LEFT: 
case AFX_IDW_DOCKBAR_RIGHT: 
case AFX_IDW_DOCKBAR_FLOAT:
}