TImageList->GetResource problems...

TImageList->GetResource problems...

Post by James Hulm » Mon, 08 Jun 1998 04:00:00



Okay, I am using BCB 1.0 and am trying to load resources into an Image List.
Here is my code:

        String ls="POS"+tmp;
        board->lbl_test->Caption=ls;
        board->il_pos->GetResource(rtBitmap,ls,0,lrTransparent,clBlack)

and here is the error I am getting:

Cannot convert 'Controls::TLoadResource' to
'System::Set<Controls::TLoadResource,0,5>'

Also, when I try to use lrNone instead of lrTransparent (which is shown in
the documentation) it gives me an undefined symbol 'lrNone' error.  Any
help?
Thank You.

 
 
 

TImageList->GetResource problems...

Post by James Hulm » Mon, 08 Jun 1998 04:00:00


Sorry, this error followed the other:
Type mismatch in parameter 'LoadFlags' in call to '_fastcall
Controls::TCustomImageList::/
GetResource(Controls::TResType,System::AnsiString,int,System::Set<Controls::
TLoadResource/
,0,5>,Graphics::TColor)'

I checked the documentation on TLoadResource and it shows lrTransparent.  I
am proly just confused... sigh...


>Okay, I am using BCB 1.0 and am trying to load resources into an Image
List.
>Here is my code:

>        String ls="POS"+tmp;
>        board->lbl_test->Caption=ls;
>        board->il_pos->GetResource(rtBitmap,ls,0,lrTransparent,clBlack)

>and here is the error I am getting:

>Cannot convert 'Controls::TLoadResource' to
>'System::Set<Controls::TLoadResource,0,5>'

>Also, when I try to use lrNone instead of lrTransparent (which is shown in
>the documentation) it gives me an undefined symbol 'lrNone' error.  Any
>help?
>Thank You.


 
 
 

TImageList->GetResource problems...

Post by Jonathan Arnol » Tue, 09 Jun 1998 04:00:00


Quote:>         String ls="POS"+tmp;
>         board->lbl_test->Caption=ls;
>         board->il_pos->GetResource(rtBitmap,ls,0,lrTransparent,clBlack)

The TLoadResources parameter is a BCB "Set", which is from Delphi.  So you
need to use:

GetResource(rtBitmap,ls,0,TLoadResources()<<lrTransparent,clBlack)

+===================================================+

| Senior Engineer           Roger Wagner Publishing |
| http://people.ne.mediaone.net/jdarnold            |
+===================================================+