Text automatisch vergrößern

  • hallo,

    ich suche nach einer Möglichkeit, einen TextLabel von ganz kein zu ziemlich groß werden zu lassen, ich hatte da an eine For Schleife gedacht aber jetzt hab ich ehrlich gesagt keine ahnung wie ich das ansetzen soll, kann mir jemand helfen?

    LG
    Ququknife

    Frühere Werke: PC-Nutzungslaufzeit

    Einmal editiert, zuletzt von Ququknife (21. November 2012 um 21:13) aus folgendem Grund: Präfix Änderung

  • Will das es mit einer Art zoom effekt größer wird?

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.

  • so was vil. auf die schnelle

    [autoit]


    $Main = GUICreate("",300,300,-1,-1)
    $Label = GUICtrlCreateLabel("Aaaaaa",1,1,300,300)
    While 1
    GUISetState(@SW_SHOW,$Main)
    For $a = 9 to 30 Step 1
    Sleep(500)
    GUICtrlSetFont($Label ,$a, 400, 0, "Arial")
    Next
    WEnd

    [/autoit]

    :thumbup:

    • Offizieller Beitrag

    Eventuell meinst du das Anpassen beim Resizen des Fensters?

    Du könntest das SIZE-Event auswerten und je nach der neuen Größe des Labels den Font anpassen.
    Welchen Platz dein Text mit welchem Font beansprucht, kannst du z.B. vorab in allen Variationen mit dem TextMeter feststellen und dann je nach aktueller Größe den passenden Font wählen.

    [autoit]

    $hGui = GUICreate('Test', 400, 300, -1, -1, BitOR(0x00040000,0x00080000)) ; $WS_SIZEBOX 0x00040000, $WS_SYSMENU 0x00080000
    $cLabel = GUICtrlCreateLabel('Label', 20, 20)
    GUICtrlSetBkColor(-1, 0xfefefe)
    GUICtrlSetResizing(-1, 1) ; 1 = $GUI_DOCKAUTO
    GUIRegisterMsg(0x0214, '_WM_SIZING')

    [/autoit][autoit][/autoit][autoit]

    GUISetState()

    [/autoit][autoit][/autoit][autoit]

    Do
    Until GUIGetMsg() = -3

    [/autoit][autoit][/autoit][autoit]

    Func _WM_SIZING($hWnd, $Msg, $wParam, $lParam)
    If $hWnd <> $hGui Then Return 'GUI_RUNDEFMSG'
    Local $aSize = ControlGetPos($hWnd, '', $cLabel)
    Local $iWidth = $aSize[2]
    Local $iHeight = $aSize[3]
    ConsoleWrite('Label Breite/Höhe: ' & $iWidth & '/' & $iHeight & @CRLF)
    Return 'GUI_RUNDEFMSG'
    EndFunc

    [/autoit]
  • Hier ein Beispiel. Schaut aber nicht schön aus, finde ich...

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt('MustDeclareVars', 1)
    Opt('GUIOnEventMode', 1)
    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $i_WIDTH = 400, $i_HEIGHT = 300
    Global $h_GUI, $h_Graphic

    [/autoit] [autoit][/autoit] [autoit]

    $h_GUI = GUICreate('', $i_WIDTH, $i_HEIGHT)
    $h_Graphic = _GDIPlus_GraphicsCreateFromHWND($h_GUI)
    GUISetOnEvent(-3, '_Exit', $h_GUI)
    GUISetState(@SW_SHOW, $h_GUI)

    [/autoit] [autoit][/autoit] [autoit]

    While True
    For $i = 10 To 70
    _GDIPlus_GraphicsClear($h_Graphic, 0xFFFFFFFF)
    _GDIPlus_GraphicsDrawStringCustom($h_Graphic, '$var', $i_WIDTH / 2, 100, $i, 0xFF000000, 1, 0, 'Tahoma')
    Sleep(50)
    Next
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    _GDIPlus_GraphicsDispose($h_Graphic)
    _GDIPlus_Shutdown()
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ===================================================================
    ; Name ..........: _GDIPlus_GraphicsDrawStringCustom
    ; Description ...: Draw a customized string
    ; AutoIt Version : v3.3.6.1
    ; Syntax ........: _GDIPlus_GraphicsDrawStringCustom ($h_Graphics, $s_String, $n_X, $n_Y, $n_Size, $b_Color[, $i_Align = 0[, $i_Weight = 0[, $s_Font = 'Arial']]])
    ; Parameter(s): .: $h_Graphics - Handle to a Graphics object
    ; $s_String - String to be drawn
    ; $n_X - X coordinate where the string will be drawn
    ; $n_Y - Y coordinate where the string will be drawn
    ; $n_Size - Font size to use for drawing
    ; $b_Color - Alpha, Red, Green and Blue components
    ; $i_Align - The alignment can be one of the following:
    ; |0 - The text is aligned to the left
    ; |1 - The text is centered
    ; |2 - The text is aligned to the right
    ; $i_Weight - The style of the typeface. Can be a combination of the following:
    ; |0 - Normal weight or thickness of the typeface
    ; |1 - Bold typeface
    ; |2 - Italic typeface
    ; |4 - Underline
    ; |8 - Strikethrough
    ; $s_Font - Name of the Font Family
    ; Return Value ..: Success - True
    ; Failure - False
    ; Author(s) .....: $var
    ; ==============================================================================
    Func _GDIPlus_GraphicsDrawStringCustom ($h_Graphics, $s_String, $n_X, $n_Y, $n_Size, $b_Color, $i_Align = 0, $i_Weight = 0, $s_Font = 'Arial')
    Local $a_CreateSolidFill, $a_CreateStringFormat, $a_CreateFontFamilyFromName, $a_CreateFont, $t_Struct, $p_Layout, $a_Return
    $a_CreateSolidFill = DllCall ($ghGDIPDll, 'int', 'GdipCreateSolidFill', 'int', $b_Color, 'dword*', 0)
    $a_CreateStringFormat = DllCall ($ghGDIPDll, 'int', 'GdipCreateStringFormat', 'int', 0, 'word', 0, 'ptr*', 0)
    $a_CreateFontFamilyFromName = DllCall ($ghGDIPDll, 'int', 'GdipCreateFontFamilyFromName', 'wstr', $s_Font, 'ptr', 0, 'handle*', 0)
    $a_CreateFont = DllCall ($ghGDIPDll, 'int', 'GdipCreateFont', 'handle', $a_CreateFontFamilyFromName[3], 'float', $n_Size, 'int', $i_Weight, 'int', 3, 'ptr*', 0)
    $t_Struct = DllStructCreate ($tagGDIPRECTF)
    $p_Layout = DllStructGetPtr ($t_Struct)
    DllStructSetData ($t_Struct, 'X', $n_X)
    DllStructSetData ($t_Struct, 'Y', $n_Y)
    DllStructSetData ($t_Struct, 'Width', 0)
    DllStructSetData ($t_Struct, 'Height', 0)
    DllCall ($ghGDIPDll, 'int', 'GdipSetStringFormatAlign', 'handle', $a_CreateStringFormat[3], 'int', $i_Align)
    $a_Return = DllCall ($ghGDIPDll, 'int', 'GdipDrawString', 'handle', $h_Graphics, 'wstr', $s_String, 'int', -1, 'handle', $a_CreateFont[5], _
    'ptr', $p_Layout, 'handle', $a_CreateStringFormat[3], 'handle', $a_CreateSolidFill[2])
    DllCall ($ghGDIPDll, 'int', 'GdipDeleteFont', 'handle', $a_CreateFont[5])
    DllCall ($ghGDIPDll, 'int', 'GdipDeleteFontFamily', 'handle', $a_CreateFontFamilyFromName[3])
    DllCall ($ghGDIPDll, 'int', 'GdipDeleteStringFormat', 'handle', $a_CreateStringFormat[3])
    DllCall ($ghGDIPDll, 'int', 'GdipDeleteBrush', 'handle', $a_CreateSolidFill[2])
    Return $a_Return[0] = 0
    EndFunc ;==> _GDIPlus_GraphicsDrawStringCustom

    [/autoit]

    Die Funktion in Zeile 18 kann natürlich auch durch die standard-Func _GDIPlus_GraphicsDrawString ersetzt werden.

  • $var
    Danke für die Links zu den Tutorials, so langsam komm ich an GDI+ ran nur hänge ich gerade an einem Problem:

    Du hattest deine Schrift mit _GDIPlus_GraphicsDrawStringCustom Animiert, ich würde es gerne nur mit _GDIPlus_GraphicsDrawString Animieren, geht das irgendwie? wenn ich das versuche klappt wieder nichts :/

    Muss hinzufügen, Hintergrund der GUI soll Schwarz sein und Schrift Rot das will bei mir auch nicht ganz funktionieren

  • Mit _GDIPlus_GraphicsDrawString wird das nicht funktionieren, da du damit weder die Schriftfarbe noch die Ausrichtung noch sonst etwas einstellen kannst.
    Eine ziemlich blöde Funktion und nicht ernsthaft zu gebrauchen... Du müsstest dabei zu _GDIPlus_GraphicsDrawStringEx greifen.
    In der Hilfe findest du Hilfe dazu. :D

    Ganz ehrlich muss ich aber sagen, dass diese Funktion absolut überkompliziert aufgebaut ist. Gerade am Anfang schreckt sie ziemlich ab, da man dafür ziemlich viel erstellen und disposen muss. Außerdem ist sie langsamer, als die Custom-Variante... Die Entscheidung liegt bei dir.

  • Zitat

    Außerdem ist sie langsamer, als die Custom-Variante...


    Wie das? Beide Funktionen machen den selben DllCall zur Funktion GdipDrawString in der gdiplus.dll. Der einzige Unterschied ist, dass die Custom Variante in der Funktion die benötigten Objekte erzeugt und löscht (bei jedem Aufruf) während DrawStringEx nur den DllCall beinhaltet und verlangt, dass du die Objekte selbst erstellst und bei jedem Aufruf per Parameter übergibst. Wenn die Funktion so oft hintereinander verwendet wird, sollte man meiner Meinung nach eher auf DrawStringEx zurückgreifen.

  • Ich würde einen Pfad verwenden.
    Damit kann man die Bewegung wirklich smooth machen:
    (Und außerdem die Schrift umranden, was bei DrawString auch nicht geht)

    Spoiler anzeigen
    [autoit]

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

    [/autoit] [autoit][/autoit] [autoit]

    Opt('MustDeclareVars', 1)
    Opt('GUIOnEventMode', 1)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $iWidth = 400
    Global $iHeight = 200

    [/autoit] [autoit][/autoit] [autoit]

    Global $hGui = GUICreate("GDI+", $iWidth, $iHeight)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
    Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui)
    Global $hBmpBuffer = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphics)
    Global $hGfxBuffer = _GDIPlus_ImageGetGraphicsContext($hBmpBuffer)
    _GDIPlus_GraphicsSetSmoothingMode($hGfxBuffer, 2)
    _GDIPlus_GraphicsClear($hGfxBuffer, 0xFFFFFFFF)

    [/autoit] [autoit][/autoit] [autoit]

    Global $hPen = _GDIPlus_PenCreate(0xFF0000FF, 3)
    Global $hBrush = _GDIPlus_BrushCreateSolid(0xFFFFAA00)

    [/autoit] [autoit][/autoit] [autoit]

    GUIRegisterMsg($WM_PAINT, "WM_PAINT")
    GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND")

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    Global $hPath = _CreatePath("Text ;)")
    Global $fStep = 0
    While 1
    $fStep += 0.025
    _Draw(Abs(Sin($fStep)))
    Sleep(10)
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Draw($fScale)
    _GDIPlus_GraphicsClear($hGfxBuffer, 0xFFFFFFFF)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    DllCall($ghGDIPDll, "uint", "GdipTranslateWorldTransform", "hwnd", $hGfxBuffer, "float", -$iWidth / 2, "float", -$iHeight / 2, "int", False)
    DllCall($ghGDIPDll, "uint", "GdipScaleWorldTransform", "hwnd", $hGfxBuffer, "float", $fScale, "float", $fScale, "int", True)
    DllCall($ghGDIPDll, "uint", "GdipTranslateWorldTransform", "hwnd", $hGfxBuffer, "float", $iWidth / 2, "float", $iHeight / 2, "int", True)

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ghGDIPDll, "uint", "GdipDrawPath", "hwnd", $hGfxBuffer, "hwnd", $hPen, "hwnd", $hPath)
    DllCall($ghGDIPDll, "uint", "GdipFillPath", "hwnd", $hGfxBuffer, "hwnd", $hBrush, "hwnd", $hPath)

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ghGDIPDll, "uint", "GdipResetWorldTransform", "hwnd", $hGfxBuffer)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
    EndFunc ;==>_Draw

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _CreatePath($sText)
    Local $hFormat = _GDIPlus_StringFormatCreate()
    Local $hFamily = _GDIPlus_FontFamilyCreate("Arial Black")

    [/autoit] [autoit][/autoit] [autoit]

    Local $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)
    Local $tBounds = _GDIPlus_RectFCreate(0, 0, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePath", "int", 0, "int*", 0)
    If @error Or Not IsArray($aResult) Then Return SetError(1, 1, False)
    Local $hPath = $aResult[2]

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ghGDIPDll, "uint", "GdipAddPathString", "hwnd", $hPath, "wstr", $sText, "int", -1, "hwnd", $hFamily, "int", 1, "float", 100, "ptr", DllStructGetPtr($tLayout), "hwnd", $hFormat)
    DllCall($ghGDIPDll, "uint", "GdipGetPathWorldBounds", "hwnd", $hPath, "ptr", DllStructGetPtr($tBounds), "hwnd", 0, "hwnd", 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix, -DllStructGetData($tBounds, "X"), -DllStructGetData($tBounds, "Y"))
    _GDIPlus_MatrixScale($hMatrix, $iWidth / DllStructGetData($tBounds, "Width"), $iHeight / DllStructGetData($tBounds, "Height"), True)
    DllCall($ghGDIPDll, "uint", "GdipTransformPath", "hwnd", $hPath, "hwnd", $hMatrix)
    _GDIPlus_MatrixDispose($hMatrix)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)

    [/autoit] [autoit][/autoit] [autoit]

    Return $hPath
    EndFunc ;==>_CreatePath

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func WM_PAINT($hWnd, $uMsgm, $wParam, $lParam)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_PAINT

    [/autoit] [autoit][/autoit] [autoit]

    Func WM_ERASEBKGND($hWnd, $uMsgm, $wParam, $lParam)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
    Return True
    EndFunc ;==>WM_ERASEBKGND

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    DllCall($ghGDIPDll, "uint", "GdipDeletePath", "hwnd", $hPath)
    _GDIPlus_PenDispose($hPen)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGfxBuffer)
    _GDIPlus_BitmapDispose($hBmpBuffer)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Exit

    [/autoit]

    Um die Schrift zu zoomen, verändere ich hier den Graphicscontext.
    Man kann jedoch auch den Pfad selber zoomen (bzw. auch den Backbuffer).
    Welche Variante man wählt, hängt vom gewünschten Ergebnis ab

    E

  • @eukalypts
    wow das sieht echt super aus, wusste gar nicht dass sowas mit GDI+ möglich ist.

    farben sind natürlich beliebig veränderbar oder?

    da hätt ich noch andere frage zu den Farben, wenn ich ne GUI erstelle dann kann ich ja den Hintergrund der GUI mit GUISetBkColor verändern, das wäre kein Problem aber man kann ja auch per GDI+ den Hintergrund der GUI verändern mit diesem Code:

    _GDIPlus_GraphicsFillRect($hGraphics, 0, 0, 400, 300, _GDIPlus_BrushCreateSolid(0xFF000000)) ; Dieses Beispiel schwarz Funktioniert, aber wenn ich aus schwarz z.B. Blau machen will mit dem richtigen Farbcode dazu setzt es die hintergrundfahre der GUI auf die StandardGUIFarbe, weis da jemand warum, und wie ich das richtig hinbekomme?

  • So kannst du die Farben anpassen:

    Spoiler anzeigen
    [autoit]

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

    [/autoit] [autoit][/autoit] [autoit]

    Opt('MustDeclareVars', 1)
    Opt('GUIOnEventMode', 1)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $iWidth = 400
    Global $iHeight = 200

    [/autoit] [autoit][/autoit] [autoit]

    Global $iColor_BG = 0xFF5555FF
    Global $iColor_TextFill = 0xFFFFAA00
    Global $iColor_TextBorder = 0xFFA00000

    [/autoit] [autoit][/autoit] [autoit]

    Global $hGui = GUICreate("GDI+", $iWidth, $iHeight)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
    Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui)
    Global $hBmpBuffer = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphics)
    Global $hGfxBuffer = _GDIPlus_ImageGetGraphicsContext($hBmpBuffer)
    _GDIPlus_GraphicsSetSmoothingMode($hGfxBuffer, 2)
    _GDIPlus_GraphicsClear($hGfxBuffer, $iColor_BG)

    [/autoit] [autoit][/autoit] [autoit]

    Global $hPen = _GDIPlus_PenCreate($iColor_TextBorder, 3)
    Global $hBrush = _GDIPlus_BrushCreateSolid($iColor_TextFill)

    [/autoit] [autoit][/autoit] [autoit]

    GUIRegisterMsg($WM_PAINT, "WM_PAINT")
    GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND")

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    Global $hPath = _CreatePath("Text ;)")
    Global $fStep = 0
    While 1
    $fStep += 0.025
    _Draw(Abs(Sin($fStep)))
    Sleep(10)
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Draw($fScale)
    _GDIPlus_GraphicsClear($hGfxBuffer, $iColor_BG)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    DllCall($ghGDIPDll, "uint", "GdipTranslateWorldTransform", "hwnd", $hGfxBuffer, "float", -$iWidth / 2, "float", -$iHeight / 2, "int", False)
    DllCall($ghGDIPDll, "uint", "GdipScaleWorldTransform", "hwnd", $hGfxBuffer, "float", $fScale, "float", $fScale, "int", True)
    DllCall($ghGDIPDll, "uint", "GdipTranslateWorldTransform", "hwnd", $hGfxBuffer, "float", $iWidth / 2, "float", $iHeight / 2, "int", True)

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ghGDIPDll, "uint", "GdipDrawPath", "hwnd", $hGfxBuffer, "hwnd", $hPen, "hwnd", $hPath)
    DllCall($ghGDIPDll, "uint", "GdipFillPath", "hwnd", $hGfxBuffer, "hwnd", $hBrush, "hwnd", $hPath)

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ghGDIPDll, "uint", "GdipResetWorldTransform", "hwnd", $hGfxBuffer)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
    EndFunc ;==>_Draw

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _CreatePath($sText)
    Local $hFormat = _GDIPlus_StringFormatCreate()
    Local $hFamily = _GDIPlus_FontFamilyCreate("Arial Black")

    [/autoit] [autoit][/autoit] [autoit]

    Local $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)
    Local $tBounds = _GDIPlus_RectFCreate(0, 0, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePath", "int", 0, "int*", 0)
    If @error Or Not IsArray($aResult) Then Return SetError(1, 1, False)
    Local $hPath = $aResult[2]

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ghGDIPDll, "uint", "GdipAddPathString", "hwnd", $hPath, "wstr", $sText, "int", -1, "hwnd", $hFamily, "int", 1, "float", 100, "ptr", DllStructGetPtr($tLayout), "hwnd", $hFormat)
    DllCall($ghGDIPDll, "uint", "GdipGetPathWorldBounds", "hwnd", $hPath, "ptr", DllStructGetPtr($tBounds), "hwnd", 0, "hwnd", 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix, -DllStructGetData($tBounds, "X"), -DllStructGetData($tBounds, "Y"))
    _GDIPlus_MatrixScale($hMatrix, $iWidth / DllStructGetData($tBounds, "Width"), $iHeight / DllStructGetData($tBounds, "Height"), True)
    DllCall($ghGDIPDll, "uint", "GdipTransformPath", "hwnd", $hPath, "hwnd", $hMatrix)
    _GDIPlus_MatrixDispose($hMatrix)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)

    [/autoit] [autoit][/autoit] [autoit]

    Return $hPath
    EndFunc ;==>_CreatePath

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func WM_PAINT($hWnd, $uMsgm, $wParam, $lParam)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_PAINT

    [/autoit] [autoit][/autoit] [autoit]

    Func WM_ERASEBKGND($hWnd, $uMsgm, $wParam, $lParam)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
    Return True
    EndFunc ;==>WM_ERASEBKGND

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    DllCall($ghGDIPDll, "uint", "GdipDeletePath", "hwnd", $hPath)
    _GDIPlus_PenDispose($hPen)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGfxBuffer)
    _GDIPlus_BitmapDispose($hBmpBuffer)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Exit

    [/autoit]


    Ich hab dir einfach ein paar globale Variablen an den benötigten Stellen eingesetzt.

  • ok das war wirklich Hilfreich danke euch @all jetzt noch eine letzte Frage, wo finde ich die ganzen Codes für die Farben, denn ich weis die ganzen Farbcodes nicht auswendig und im Internet finde ich Komischerweise nur die Farbcodes die ich in AutoIt nicht verwenden kann weis da jemand eine Seite wo die AutoIt Farbcodes aufgelistet sind?

  • Wenn es dich interessiert....
    Sowas wie BugFix' Tool brauch man eigentlich nicht. :D
    (Nicht böse gemeint, McBarby... :whistling: )

    Du musst nur mal schauen, wie der Hex-Code aufgebaut ist:
    #RRGGBB

    Nämlich 2 Stellen für jeweils Rot, Grün und Blau.
    Dabei stellt FF den höchsten Wert da (255), und 00 den niedrigsten (0).
    Also wäre #00FF00 ein 100%iges Grün, und ein #FF00FF ein wunderschönes, augenkrebserregendes Knallpink. :D

    lg chess