Print Page | Close Window

SOLVED - Loading a graphic from a resource file

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=13949
Printed Date: 07 October 2024 at 2:22am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED - Loading a graphic from a resource file
Posted By: DaveB
Subject: SOLVED - Loading a graphic from a resource file
Date Posted: 07 April 2009 at 4:14pm
I want to load pgn's from a .rc file to use on the toolbar buttons of a ribbon.  If I have a resource of:
 
      ID_FILE_EXIT     PNG     Exit.png
 
in my .rc file (compiled to Legacy.res)  how do I load it?  (I am using VB6)
 
Normally I use LoadResPicture(ID_FILE_EXIT, vbResBitmap).
 
In the ribbon control I assume I should use .LoadBitmapFromResource but I can't figure out what the first couple parameters should be.
 
Can anyone tell me what I should use?
 
DaveB



Replies:
Posted By: Oleg
Date Posted: 08 April 2009 at 12:51am
Hi,
 
Yes, LoadBitmapFromResource  will work. Use App.Instance as parameter.  But problem of such method that only compiled exe will have this resource - you won't see bitmap inside IDE. so guess its easy use ImageManager to load png in designtime.


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



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