Hab gerade beim Basteln mit C was nettes herausgefunden.
Positionierung ist etwas schwierig, aber das braucht man ja auch nicht oft.
Spoiler anzeigen
#Region _GuiCtrlSetFont.au3
;Copyrights to funkey !!
#include <WinAPI.au3>
[/autoit] [autoit][/autoit] [autoit]OnAutoItExitRegister("_FontCleanUp")
Global $ahFontEx[1] = [0]
Func _GuiCtrlSetFont($controlID, $size, $weight = 400, $attribute = 0, $rotation = 0, $fontname= "", $quality = 2)
Local $fdwItalic = BitAND($attribute, 1)
Local $fdwUnderline = BitAND($attribute, 2)
Local $fdwStrikeOut = BitAND($attribute, 4)
ReDim $ahFontEx[UBound($ahFontEx) + 1]
$ahFontEx[0] += 1
$ahFontEx[$ahFontEx[0]] = _WinAPI_CreateFont($size, 0, $rotation * 10, $rotation, $weight, _
$fdwItalic, $fdwUnderline, $fdwStrikeOut, -1, 0, 0, $quality, 0, $fontname)
GUICtrlSendMsg($controlID, 48, $ahFontEx[$ahFontEx[0]], 1)
EndFunc
Func _FontCleanUp()
For $i = 1 To $ahFontEx[0]
_WinAPI_DeleteObject($ahFontEx[$i])
Next
EndFunc
#EndRegion
Global $hGui1 = GuiCreate("AutoIt Main-GUI", 300, 340, 100, 100, -1, 0);
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]For $i = 0 To 350 Step 30
GUICtrlCreateLabel("Das ist ein Text", 50, 0, 300, 220, 0x201)
_GuiCtrlSetFont(-1, 15, 1000, 1, $i)
GUICtrlSetBkColor(-1, -2)
Next
GUICtrlCreateLabel("Das ist ein vertikaler Text", 10, 30,200, 200, 0x001)
_GuiCtrlSetFont(-1, 15, 400, 1, -90)
GUICtrlSetBkColor(-1, -2)
GUICtrlCreateLabel("Das auch!!", 130, 50, 200, 200, 0x202)
_GuiCtrlSetFont(-1, 15, 400, 1, 90)
GUICtrlSetBkColor(-1, -2)
GuiCtrlCreateButton("Button mit schrägem Text", 10, 220, 275, 60, 0x0800);
_GuiCtrlSetFont(-1, 20, 1000, 1,
GuiCtrlCreateCombo("Hallo", 10, 290, 275, 80, 0x3, -1);
_GuiCtrlSetFont(-1, 15, 1000, 1, -3)
GUICtrlSetData(-1, "Eintrag2|Eintrag3")
GuiSetState(@SW_SHOW, $hGui1);
[/autoit] [autoit][/autoit] [autoit]Do
Until GUIGetMsg() = -3