Jump to content

Recommended Posts

Posted

Dear all, suppose I define an array of graphics using _GDIPlus_GraphicsCreateFromHWND. At the end of the script, when calling _GDIPlus_GraphicsDispose, is it ok to pass the array as an argument, or do I need to write a loop for each array element? For example:

_GDIPlus_GraphicsDispose($GraphsArray) 

 

OR

 

For $i 0 to 10

    _GDIPlus_GraphicsDispose($GraphsArray[$i])

Next

I did both and can see no difference. In fact, if I do not call _GDIPlus_GraphicsDispose I don't see anything going, to be frank. Thank you for any help,

Cabrunco

Posted

You need to pass each handle to the graphics object (using the for loop). The _GDIplus_GFraphicsDispose function does this DLLCall

DllCall($__g_hGDIPDll, "int", "GdipDeleteGraphics", "handle", $hGraphics)

GdipDeleteGraphics takes a pointer to a graphic (your graphic object).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...