Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Background color to the right of toolbar

122 views
Skip to first unread message

Glenn

unread,
Jun 6, 2002, 8:21:47 AM6/6/02
to
Hi,
I wonder how to make the whole toolbar area a specific color. I've
managed to change the color of the area behind the toolbar buttons by
using OnEraseBkgnd, and I also have my own color in the dialog bar to
the right of the toolbar (using OnCtlColor). But the toolbar and
dialogbar only uses up half of the screen width, and the rest of the are
below the menu are still grey.

I have also subclassed the m_hWndMDIClient window to see if that fixed
the color problem, but I guess my MainFrame window has yet another
window encapsulating the toolbar and dialog bar windows. How do I change
the background color of the whole toolbar area, between the menu and the
MDI client area?

thanks,
Glenn

Jerry

unread,
Jun 6, 2002, 12:14:29 PM6/6/02
to
As I know, there is one simple way to do that, which is to
make an CReBar and use CReBar::AddBar(CToolBar *,....) And
you can specify the background color or use a bitmap
pattern at this stage. Well perhaps you will need to make
the CToolBar style include TBSTYLE_TRANSPARENT style, but
I am not sure of that, I think you can have a test on if
that style is necessary for the background image to show
through.

I wonder if there is a way to make color toolbar without
using ReBar, it maybe possible but I dont know and I think
it wont be easy

>.
>

Glenn

unread,
Jun 10, 2002, 8:29:25 AM6/10/02
to
Thank's, I will try that. If anyone knows of a method not involving
CReBar, I would be curious to know.
/Glenn
0 new messages