Page 1 of 1
[Implemented] CatchImage() = add Icon Support
Posted: Sat Sep 21, 2002 9:14 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.
Hi Fred
"LoadImage()" supports BMP and ICO files... Its nice to include BMP stuff to the exe and catch them later... But i still miss to include ICO files to the exe and catch (grab) them as ICO for things like "StatusBarIcon()"...
Ok, i know i can use images instead of icons... but would be nice to have ICO support too (because we can load bmp and ico)
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
Posted: Sat Sep 21, 2002 9:49 pm
by BackupUser
Restored from previous forum. Originally posted by Justin.
Yes, that would be nice. I wanted to put an animated sys tray icon with the icons inside the executable and i couldn't.
With a lot of work you can create an icon in memory, (createicon , createiconindirect api) , but i have no idea of how to make the 2 binary bitmap bitmasks that conform the icon.
Posted: Sun Sep 22, 2002 4:05 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.
Hi Fred
In fact that its not possivle to Catch Icons until now, i tried and converted all my ICO images to BMP iamges, included them and tried to Catch all the IconImages (saved as BMP) !!! Until here it works fine...
But when i try to use the catched "BMP-IconImages" in combination with the command "StatusBarIcon(#StatusBar, Feld, ImageID)" it dont work ;((( This comamnd will show the images ONLY when they are real ICO files and not BMP´s ;((
Maybe you can get it work to grab BMP and ICO with the command GrabImage() !? Would be nice... And maybe there would be a way to use BMP-Icons instead of real ICO-Icons with the command StatusBarIcon() ?? Would be really great...!!!
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
Posted: Wed Oct 02, 2002 6:55 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.
Hi Fred
Can you add the feature to grab and handle icons too, in the next version please? Would be really nice!
PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
Posted: Tue Oct 22, 2002 1:50 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.
Fred?
PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
Posted: Tue Oct 22, 2002 3:45 pm
by BackupUser
Restored from previous forum. Originally posted by Justin.
It would be handy to have direct suport, but in fact is already possible to have icons inside the executable as a resource, someone posted the clue (imagelists), i don't remember who was, so it would be something like this:
you have to convert the icons into bitmaps and create a imagelist, then you get the icon handles from the imagelist
;get imagelist handle, bitmap that contains all the icons
hbitmap=CatchImage(0,?icon)
;create imagelist, with one icon
himglist=ImageList_Create_(32,32,#ILC_COLOR4|#ILC_MASK,1,0)
;add the imagelist and set the icon transparent color rgb(128,0,0,0) in this case
ImageList_AddMasked_(himglist,hbitmap,128)
;get icon handle, you can use it with any gadget that supports icons
hicon=ImageList_GetIcon_(himglist,0,#ILD_NORMAL)
;image list in bmp format with all the icons
icon : IncludeBinary "c:\youricon.bmp"
if you look at msdn for the functions you will find a better explanation