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 » How to create 256 clors toolbar Collapse All
Subject Author Date
Artur Shingirei Apr 7, 2004 - 8:58 AM

Hello.

I want to create toolbar with 256 colors.
I did follow: Has created a toolbar using Custom control with 3 buttons(at dioalog based application), create a toolbar at MS VC++ Editor.
Has created a bitmap for toolbar and did replace the standart(which was created by MS VC++) by myself bitmap.
Question: How to set a transparent color for toolbar? Because the background around the Images at the buttons shows like not transparent.

Thanks.

Technical Support Apr 8, 2004 - 1:38 AM

Dear Artur,

The CExtToolControlBar::LoadToolbar() method adds or updates identifiers of toolbar buttons and their images
in the command manager. This method uses a RGB(192,192,192) color value as transparent. You can put the toolbar command descriptions to the command manager manually by specifying your own transparent color:

 
g_CmdManager->UpdateFromToolBar(
    "Your Command Profile Name",
    IDR_YOUR_TOOLBAR_RESOURCE,
    NULL,
    NULL,
    false,
    true,
    clrBmpTransparent // COLORREF of transparent pixels 
                     // RGB(192,192,192) is default
    );

Please note that you need to put the call of the g_CmdManager->UpdateFromToolBar() method before CExtToolControlBar::LoadToolbar().