Page 2 of 2

Re: AddResource and how to access it?

Posted: 17 May 2021, 16:32
by Rollo007
I thought this too, but since I'v been using this, windows refuses to delete the file which was used to load the image.
So I'm seeking for the problem and thought maybe I have to free it separately. Will go on for some try.

Re: AddResource and how to access it?

Posted: 17 May 2021, 16:35
by teadrinker
You can use this way (an asterisk between the colon and handle):

Code: Select all

Gui, Add, Pic,, HBITMAP:*%hBitmap%
DllCall("DeleteObject", "Ptr", hBitmap)