Print Page | Close Window

Large and small toolbar image lists

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=1737
Printed Date: 05 March 2025 at 10:27pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Large and small toolbar image lists
Posted By: larryp
Subject: Large and small toolbar image lists
Date 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





Replies:
Posted By: Sven
Date Posted: 03 February 2005 at 2:26am
You have to add the 24x24 icons with XTPImageManager()->SetIcons(...).


Posted By: larryp
Date Posted: 03 February 2005 at 7:17am
Thanks Sven.  That worked.

larryp



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