Hello NG,
I use the API ExtractIcon to get the handle of an icon File stored in a Exe File. Can I use CatchImage to create an Image Object in Memory and then Save it.
Here is how I try it
lngRetValue = ExtractIcon_(0, strCompleteFilename, 2)
If lngRetValue <> 0
CatchImage(0, lngRetValue)
SaveImage(lngRetValue, strZielverzeichnis + "\" + strFilename + ".bmp")
EndIf
Unfortunately this doesn't work. I thet a ReturnValue form the _ExtractIcon Function but i'm not able to catch the image with it.
Do I misunderstand the CatchImage function?
Thanks in advance
Stefan
CatchImage Function
You could do it this way...
Code: Select all
strCompleteFilename.s="x:\test.exe"
lngRetValue = ExtractIcon_(0, strCompleteFilename, 0)
If lngRetValue
CreateImage(1,32,32)
StartDrawing(ImageOutput())
DrawImage(lngRetValue,0,0)
StopDrawing()
SaveImage(1, "test.bmp")
EndIf