Label mit Rand

  • N'abend,
    Ich versuche mir grad einen kleinen Countdown-Timer für ein Spiel anzulegen, welches man im Fenstermodus spielen kann. Durch

    [autoit]

    _WinApi_SetWindowPos

    [/autoit]

    konnte ich meine GUI, die bis auf die Schrift selbst transparent ist (durch

    [autoit]

    _WinAPI_SetLayeredWindowAttributes

    [/autoit]

    ), in den Vordergrund bringen... Allerdings erkennt man die Schrift nicht mehr in manchen Spielsituationen.
    Nun meine Frage: Wie kann ich um die einzelnen Labels einen schwarzen Rand legen? Also nicht um das Rechteck, sondern um die Schrift selbst.
    MfG Sh4dovv

  • meinste vielleicht so was in der art?

    [autoit]


    #include <GDIPlus.au3>
    #include <winapi.au3>
    #include <windowsconstants.au3>
    Opt("GuiOnEventMode", 1)
    $tt = GUICreate("temptext", 200, 100, -1, -1, -1, $WS_EX_LAYERED)
    GUISetBkColor(0x010101)
    GUISetState()
    GUISetOnEvent(-3, "close")
    _WinAPI_SetLayeredWindowAttributes($tt, 0x010101, 255)
    _GDIPlus_Startup()
    $kPen = _GDIPlus_BrushCreateSolid(0xff000000)
    $bg = _GDIPlus_BrushCreateSolid(0xffffffff)
    $hFamily = _GDIPlus_FontFamilyCreate ("Arial")
    $hFont = _GDIPlus_FontCreate ($hFamily, 20, 0)
    $hFormat = _GDIPlus_StringFormatCreate ()
    _GDIPlus_StringFormatSetAlign($hFormat, 0)
    $tGraphic = _GDIPlus_GraphicsCreateFromHWND($tt)
    $ttLayout = _GDIPlus_RectFCreate (25, 30, 150, 30)
    _GDIPlus_GraphicsFillRect($tGraphic, 25, 30, 150, 30, $kPen)
    _GDIPlus_GraphicsDrawStringEx ($tGraphic, "Hallo Welt", $hFont, $ttLayout, $hFormat, $bg)
    Do
    sleep(20)
    until 0
    Func close()
    Exit
    EndFunc

    [/autoit]