Nettoie les ressources utilisées par Microsoft Windows GDI+
#include <GDIPlus.au3>
_GDIPlus_Shutdown ( )
Succès: | Retourne True. |
Échec: | Retourne False et définit @error <> 0, @extended contient le code erreur GPSTATUS ($GPID_ERR*). |
Vous devez libèrer la totalité de vos objets GDI+ avant d'appeler _GDIPlus_Shutdown() .
Consultez GdiplusShutdown dans la Librairie MSDN.
#include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <ScreenCapture.au3> #include <WinAPIHObj.au3> Example() Func Example() Local $hGUI, $hBMP, $hBitmap, $hGraphic ; Capturez le coin supérieur gauche de l'écran $hBMP = _ScreenCapture_Capture("", 0, 0, 400, 300) ; Crée une GUI $hGUI = GUICreate("GDI+", 400, 300) GUISetState(@SW_SHOW) ; Initialise la bibliothèque GDI+ _GDIPlus_Startup() ; Dessine le bitmap dans la GUI $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hBMP) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, 0) ; Nettoie les ressources _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hBitmap) _WinAPI_DeleteObject($hBMP) ; Arrête la bibliothèque GDI+ _GDIPlus_Shutdown() ; Boucle jusqu'à ce que l'utilisateur quitte. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>Example