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