BCGControlBar Pro for MFC
virtual HBRUSH CBCGPToolbarButton::OnCtlColor ( CDC *  pDC,
UINT  nCtlColor 
)
inlinevirtual

Called by the framework when the parent toolbar processes OnCtlColor.

The OnCtlColor function is called by the framework when the parent toolbar processes the WM_CTLCOLOR message for a CBCGPToolbarButton- derived class that contains a Windows control. It means that the OnCtlColor function will NOT be called if the toolbar button is windowless.

OnCtlColor is called in customization mode ONLY for "non-locked" toolbars.

The default implementation does nothing and returns NULL.

Parameters
pDCThe device-context.
nCtlColorThe control color.
Returns
A handle to the brush that is to be used for painting the button background.