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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 IE->IEBitmap LoadFromResource works but IE->IO->LoadFromResource doesn't

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Andy_T_Bell Posted - Aug 07 2023 : 06:10:56
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
2   L A T E S T    R E P L I E S    (Newest First)
Andy_T_Bell Posted - Aug 08 2023 : 00:41:02
Thanks Nigel

Andy

Andy Bell
xequte Posted - Aug 07 2023 : 18:40:03
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