Print Page | Close Window

Toolbar icons not displayed

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=10739
Printed Date: 03 July 2024 at 4:25am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Toolbar icons not displayed
Posted By: JerryEvans
Subject: Toolbar icons not displayed
Date Posted: 22 May 2008 at 7:51am
I've got a variety of toolbars all of which are based on 32BPP bitmaps. All are created in the same way in the OnCreate() member function of my Frame window. The snap below shows the active undo and find buttons. The 'select view' shows my problem - no bitmap. Any clues to why this is happening?




Here is the code:

CXTPToolBar* pToolBarViews = pCB->Add(_T("Views"), xtpBarTop);
    if (pToolBarViews)
    {
        pToolBarViews->SetBarID(IDR_TOOLBAR_VIEWS);
        CXTPControlPopup* p = (CXTPControlPopup*)
        pToolBarViews->GetControls()->Add(xtpControlButtonPopup,ID_VIEW_SELECT);
        if (p)
        {
            p->SetStyle(xtpButtonCaption);
            p->SetCaption("Select View");
            CMenu menu;
            menu.LoadMenu(IDR_SYSTEM);
            p->SetCommandBar(menu.GetSubMenu(1));
        }
        pToolBarViews->GetControls()->Add(xtpControlButton,ID_VIEW_CONCISE);
        DockRightOf(pToolBarViews,pTBS);
    }




Replies:
Posted By: Oleg
Date Posted: 22 May 2008 at 8:43am
Hi,
 
You create toolbar manually so have manually Load images.
 
Add bitmap + toolbar resource and call
 
pCOmmandBars->GetImageManager()->SetIcons(IDR_TOOLBAR_VIEWS);
 


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: JerryEvans
Date Posted: 22 May 2008 at 9:20am
Thanks Oleg - 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net