ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 IE->IEBitmap LoadFromResource works but IE->IO->LoadFromResource doesn't
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Andy_T_Bell

United Kingdom
4 Posts

Posted - Aug 07 2023 :  06:10:56  Show Profile  Reply
C++ Builder 11.3 and ImageEn 12.0.0

My executable has some .png resource, compiled from this resource file:

IDLE RCDATA "Idle.png"
ACTIVE RCDATA "Active.png"
ALARM RCDATA "Alarm.png"

The following code works:

IEAlarm->IEBitmap->LoadFromResource((int)HInstance, "ACTIVE", RT_RCDATA);

but the following does nothing - no errors are shown but the image does not load

IEAlarm->IO->LoadFromResource(Application->ExeName, "RCDATA", "ACTIVE", ioPNG);

I'm assuming the "RCDATA" parameter is wrong, but can't figure out what it should be - the help file mentions Bitmap or Cursor, but these don't work. I tried PNG, but that didn't work.

Just curious what I need to do to make the second option work...



Andy Bell

xequte

38615 Posts

Posted - Aug 07 2023 :  18:40:03  Show Profile  Reply
Hi Andy

In the current release version of ImageEn, the ResType parameter is case-sensitive for non-standard types, so you would need to load it as:

IEAlarm->IO->LoadFromResource(Application->ExeName, "RCData", "ACTIVE", ioPNG);

However for the upcoming release, we have made it case-insensitive.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Andy_T_Bell

United Kingdom
4 Posts

Posted - Aug 08 2023 :  00:41:02  Show Profile  Reply
Thanks Nigel

Andy

Andy Bell
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: