RE: Help with Windows API ImageList_LoadImage needed
1evan at sbcglobal.net wrote:
>
>
> Using the following definitions, when I call ImageList_LoadImage, it
> always gives me "Image not loaded."
> Any ideas why? Do I not have something defined correctly? MyIcon.ico
> is a 16x16 icon.
>
> ImageList_LoadImage = link_c_func(comctl, "ImageList_LoadImage",
> {C_INT,C_POINTER,C_INT,C_INT,C_UINT,C_UINT,C_UINT},C_INT)
>
> CLR_DEFAULT = #FF000000
>
> LR_LOADFROMFILE = #0010
>
> Image = allocate_string("MyIcon.ico")
>
> if not
> c_func(ImageList_LoadImage,{NULL,Image,16,1,CLR_DEFAULT,1,LR_LOADFROMFILE})
>
> then
> puts(1,"Image not loaded" & '\n')
> end if
>
>
Hello there,
For that particular function you need to check your types in the
function link as well as note the following:
hi (very first parameter of this function)
Handle to the instance that contains the resource.
If the hi parameter is zero, the low-order word of this parameter must
be the identifier of the OEM image to load. The OEM image identifiers
are defined in WINUSER.H. Following are the identifier prefixes and
their meanings:
Prefix Meaning
OBM_ OEM bitmaps
OIC_ OEM icons
OCR_ OEM cursors
Take care,
Al
|
Not Categorized, Please Help
|
|