Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Large and small toolbar image lists
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Large and small toolbar image lists

 Post Reply Post Reply
Author
Message
larryp View Drop Down
Groupie
Groupie


Joined: 15 January 2005
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote larryp Quote  Post ReplyReply Direct Link To This Post Topic: Large and small toolbar image lists
    Posted: 02 February 2005 at 10:55am
I just purchased Xtreme Toolkit Pro and am attempting to convert an existing application.

I have a 16x16 imagelist and a 24x24 image list for multiple toolbars.  I want to be able to use the 24x24 image list when large icons are selected.  I am able to use the 16x16 list and make the call 

 XTP_COMMANDBARS_OPTIONS* pOptions = pCommandBars->GetCommandBarsOptions();  &nbs p; pOptions->szLargeIcons = CSize (24, 24);

but this appears to enlarge the 16x16 icon images.

If I only have a single toolbar then the following code seems to work:

    // Create "File" ToolBar
    CXTPToolBar* pFileToolBar = dynamic_cast<CXTPToolBar*>(pCommandBars->Add(_T( "File Toolbar"), xtpBarTop));
    if (!pFileToolBar || !pFileToolBar->LoadToolBar(IDR_FILE_TOOLBAR))
    {
        TRACE0("Failed to create File toolbar\n");
        return -1;
    }
    CXTPToolBar* pFileToolBarMedium = dynamic_cast<CXTPToolBar*>(pCommandBars->Add(_T( "File Toolbar Medium"), xtpBarTop));
    if (!pFileToolBarMedium || !pFileToolBarMedium->LoadToolBar(IDR_FILE_TOOLBAR_MEDIUM) )
    {
        TRACE0("Failed to create File toolbar Medium\n");
        return -1;
    }

but when adding multiple toolbars the 2nd through nth toolbar is shown twice.

Does anyone know the correct method of doing this?

Thanks,

larryp


Back to Top
Sven View Drop Down
Senior Member
Senior Member


Joined: 21 August 2003
Location: Germany
Status: Offline
Points: 127
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sven Quote  Post ReplyReply Direct Link To This Post Posted: 03 February 2005 at 2:26am
You have to add the 24x24 icons with XTPImageManager()->SetIcons(...).
Back to Top
larryp View Drop Down
Groupie
Groupie


Joined: 15 January 2005
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote larryp Quote  Post ReplyReply Direct Link To This Post Posted: 03 February 2005 at 7:17am
Thanks Sven.  That worked.

larryp
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.