Print Page | Close Window

AddIconHandle (ActiveX)

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=252
Printed Date: 27 November 2024 at 2:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: AddIconHandle (ActiveX)
Posted By: robs
Subject: AddIconHandle (ActiveX)
Date Posted: 28 November 2003 at 10:13pm

The StaticBars sample shows how to use AddIconHandle to add icons from a bitmap file. I couldn't find an example of how to use a resource file, so here's mine.

To load an icon from a resource file:

Dim p As IPictureDisp
Set p = LoadResPicture(101, 1)
CommandBars.AddIconHandle p.Handle, ID, 0, False

 

 

 

 




Replies:
Posted By: Maui
Date Posted: 19 December 2004 at 5:43am

Thank you for your post.

I used it to load an icon from the resource and into the TaskPanel

    Dim p As IPictureDisp
    Set p = LoadResPicture(101, vbResIcon)
    wndToolBox.Icons.AddIcon p.Handle, 1, xtpImageNormal
    Set p = Nothing

 




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