Extended Multi Size Multi Color Toolbar! | CodeGuru

Extended Multi Size Multi Color Toolbar!

This package differ from other package from the point of view that it support small or large icon. Text or no text and 16 or 256 colors. You can use icon or bitmap to create the toolbar. It is using the explorer toolbar, so you need at least explorer 3. It’s easy and nice to […]

Written By
CodeGuru Staff
CodeGuru Staff
Aug 22, 1998
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

This package differ from other package from the point of view that it support small or
large icon. Text or no text and 16 or 256 colors. You can use icon or bitmap to create the
toolbar.

It is using the explorer toolbar, so you need at least explorer 3. It’s easy and nice
to use.

This is a sample on how to use it. For further information, take a look at the sample
application zip files.

    // This is a toolbar using bitmap resource file.
    if (!m_stdToolBar.Create(this) ||
        !m_stdToolBar.LoadToolBar(IDR_MAINFRAME))
    {
        TRACE0("Failed to create toolbar\n");
        return -1;      // fail to create
    }

    m_stdToolBar.SetBitmap( IBD_SM,         COOBmpToolBar::SmallHot,         RGB( 30, 179, 223 ) );
    m_stdToolBar.SetBitmap( IDB_SM_BW,      COOBmpToolBar::SmallStandard,   RGB( 30, 179, 223 ) );
    m_stdToolBar.SetBitmap( IDB_SM_DB,      COOBmpToolBar::SmallDisable,     RGB( 172, 172, 172 ) );
    m_stdToolBar.SetBitmap( IDB_LG,         COOBmpToolBar::LargeHot,         RGB( 33, 231, 222 ) );
    m_stdToolBar.SetBitmap( IDB_LG_BW,      COOBmpToolBar::LargeStandard,   RGB( 33, 231, 222 ) );
    m_stdToolBar.SetBitmap( IDB_LG_DB,      COOBmpToolBar::LargeDisable,     RGB( 170, 170, 170 ) );
    m_stdToolBar.SetBitmap( IDB_SM_16,      COOBmpToolBar::SmallHot,         RGB( 0, 255, 255 ), false );
    m_stdToolBar.SetBitmap( IDB_SM_BW_16,   COOBmpToolBar::SmallStandard,   RGB( 0, 255, 255 ), false );
    m_stdToolBar.SetBitmap( IDB_SM_DB_16,   COOBmpToolBar::SmallDisable,     RGB( 192, 192, 192 ), false );
    m_stdToolBar.SetBitmap( IDB_LG_16,      COOBmpToolBar::LargeHot,         RGB( 0, 255, 255 ), false );
    m_stdToolBar.SetBitmap( IDB_LG_BW_16,   COOBmpToolBar::LargeStandard,   RGB( 0, 255, 255 ), false );
    m_stdToolBar.SetBitmap( IDB_LG_DB_16,   COOBmpToolBar::LargeDisable,     RGB( 192, 192, 192 ), false );
    m_stdToolBar.InitImageList();

    // set button to dropdown list
    m_stdToolBar.SetButtonDropDown( ID_FILE_OPEN );
    m_stdToolBar.SetButtonDropDown( ID_FILE_SAVE );

    // This is a toolbar using bitmap resource file.
    if (!m_IconToolBar.Create(this) ||
        !m_IconToolBar.LoadToolBar(IDR_ICONTOOLBAR))
    {
        TRACE0("Failed to create toolbar\n");
        return -1;      // fail to create
    }

    m_IconToolBar.SetIcon( IDR_MAINFRAME, IDR_EXTOOLTYPE, IDR_EXTOOLTYPE );
    m_IconToolBar.SetIcon( IDR_EXTOOLTYPE, IDR_MAINFRAME, IDR_MAINFRAME );
    m_IconToolBar.InitImageList();

    // ... Standard stuff ...


Download demo project – 212KB

Download source – 13KB

Date Posted: 7/31/98

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.