Erstellt eine $tagGDIPRECTF Struktur
#Include <GDIPlus.au3>
_GDIPlus_RectFCreate([$nX = 0[, $nY = 0[, $nWidth = 0[, $nHeight = 0]]]])
Parameter
| $nX | [optional] X-Koordinate der oberen, linken Ecke des Rechtecks |
| $nY | [optional] Y-Koordinate der oberen, linken Ecke des Rechtecks |
| $nWidth | [optional] Breite des Rechtecks |
| $nHeight | [optional] Höhe des Rechtecks |
Rückgabewert
Gibt eine $tagGDIPRECTF Struktur zurück
Bemerkungen
Keine.
Verwandte Funktionen
$tagGDIPRECTF
Beispiel
#include <GuiConstantsEx.au3>
#include <GDIPlus.au3>
Opt('MustDeclareVars', 1)
_Main()
Func _Main()
Local $hGUI, $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout
; Erstellt eine GUI
$hGUI = GUICreate("GDI+", 400, 300)
GUISetState()
; Zeichnet einen String
_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, "Hallo Welt!", $hFont, $tLayout, $hFormat, $hBrush)
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
; Ressourcen freigeben
_GDIPlus_FontDispose ($hFont)
_GDIPlus_FontFamilyDispose ($hFamily)
_GDIPlus_StringFormatDispose ($hFormat)
_GDIPlus_BrushDispose ($hBrush)
_GDIPlus_GraphicsDispose ($hGraphic)
_GDIPlus_ShutDown ()
EndFunc ;==>_Main