Crée une structure $tagGDIPRECTF
#include <GDIPlus.au3>
_GDIPlus_RectFCreate ( [$nX = 0 [, $nY = 0 [, $nWidth = 0 [, $nHeight = 0]]]] )
$nX | [optionnel] Coordonnée X du coin supérieur gauche du rectangle |
$nY | [optionnel] Coordonnée Y du coin supérieur gauche du rectangle |
$nWidth | [optionnel] Largeur du rectangle |
$nHeight | [optionnel] Hauteur du rectangle |
#include <GDIPlus.au3> #include <GUIConstantsEx.au3> Example() Func Example() Local $hGUI, $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout ; Crée une GUI $hGUI = GUICreate("GDI+", 400, 300) GUISetState(@SW_SHOW) ; Dessine une chaîne _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) $hBrush = _GDIPlus_BrushCreateSolid(0xFF00007F) $hFormat = _GDIPlus_StringFormatCreate() $hFamily = _GDIPlus_FontFamilyCreate("Arial") $hFont = _GDIPlus_FontCreate($hFamily, 12, 2) $tLayout = _GDIPlus_RectFCreate(140, 110, 100, 20) _GDIPlus_GraphicsDrawStringEx($hGraphic, "Hello world", $hFont, $tLayout, $hFormat, $hBrush) ; Boucle jusqu'à ce que l'utilisateur quitte. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Nettoie les ressources _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_BrushDispose($hBrush) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() EndFunc ;==>Example