Print Page | Close Window

Icons from Resource

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=22922
Printed Date: 24 November 2024 at 5:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Icons from Resource
Posted By: Karl77
Subject: Icons from Resource
Date Posted: 15 February 2016 at 9:10am
Hi all,

I'm in the middle of evaluating CommandBars ActiveX.

Preface:
I have a working program which uses PNGs for icons.
They get loaded into an imagelist from a resource file.
They work fine in the CC5 toolbars as EXE and in the IDE.

Q:
I'd like to use these imagelists with the command bars.

CommandBarsA.AddImageList imgl_24
AddControl ToolBar.Controls, xtpControlButton, 1, "&New", False, "Create a new document"

This doesn't show an icon.
I thought the 1 adresses the first icon.
Not sure if the problem is to tell the commandbars the right index.
In the examples and here in the forum I couldn't find an answer.

What is the right syntax or command construction?
Or am I on the wrong path?

Thank you.


(BTW, why I can't use the image manager:
I have found no method to load the icons from resource.
I have only PNGs now, but could easily switch to the ICO format.
I know there is LoadIconFromResource, but this requires a compiled exe.
Not so very handy when working in the IDE...
If I miss something, I'll be happy to get a hint.)





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