UDF > GDIPlus > ArrowCap >


_GDIPlus_ArrowCapDispose

Libère les ressources de l'objet embout de flèche

#include <GDIPlus.au3>
_GDIPlus_ArrowCapDispose ( $hCap )

Paramètre

$hCap Handle de l'embout de flèche

Valeur de retour

Succès: Retourne True
Échec: Retourne False et définit @error <> 0, @extended contient le code erreur GPSTATUS ($GPID_ERR*)

En relation

_GDIPlus_ArrowCapCreate

Voir aussi

Consultez GdipDeleteCustomLineCap dans la Library MSDN.

Exemple

#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
    Local $hGUI, $hGraphic, $hPen, $hEndCap

    ; Crée une GUI
    $hGUI = GUICreate("GDI+", 400, 300)
    GUISetState(@SW_SHOW)

    ; Crée des ressources
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    $hPen = _GDIPlus_PenCreate(0xFF000000, 2)
    $hEndCap = _GDIPlus_ArrowCapCreate(3, 6)
    _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)

    ; Affiche la pointe de flèche
    MsgBox($MB_SYSTEMMODAL, "Information", "Pen end cap: 0x" & Hex(_GDIPlus_PenGetCustomEndCap($hPen)))

    ; Dessine des flèches
    _GDIPlus_GraphicsDrawLine($hGraphic, 10, 120, 390, 120, $hPen)
    _GDIPlus_PenSetWidth($hPen, 4)
    _GDIPlus_GraphicsDrawLine($hGraphic, 10, 150, 390, 150, $hPen)
    _GDIPlus_PenSetWidth($hPen, 6)
    _GDIPlus_GraphicsDrawLine($hGraphic, 10, 180, 390, 180, $hPen)

    ; Boucle jusqu'à ce que l'utilisateur quitte.
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Nettoie les ressources
    _GDIPlus_ArrowCapDispose($hEndCap)
    _GDIPlus_PenDispose($hPen)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
EndFunc   ;==>Example