Elle ne casse pas trois pattes à un canard , mais bon!
Cette fonction permet de créer des labels ombrés ainsi que le réglage de différentes options !
► Afficher le texte
Code : Tout sélectionner
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
$GUI = GUICreate("Gui", 200, 200, -1, -1)
CreateLabelWithShadow("This is a test !",0xFFFF00,0x000000,15, 10, 200, 40,800,0,20,"MS Sans Serif")
CreateLabelWithShadow("This is a test !",0xFF3800,0x000000,15, 40, 200, 40,800,2,20,"MS Sans Serif")
CreateLabelWithShadow("This is a test !",0x0500FF,0x000000,15, 70, 200, 40,800,4,20,"MS Sans Serif")
CreateLabelWithShadow("This is a test !",0x964700,0x000000,15, 100, 200, 40,800,8,20,"MS Sans Serif")
CreateLabelWithShadow("This is a test !",0x09FF00,0x000000,15, 130, 200, 40,800,6,20,"MS Sans Serif")
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
EndSelect
WEnd
;CreateLabelWithShadow(text,$color,droppedcolor,left,top,with,$height,$fontweight,$fontattribute,$fontsize,$fontname)
Func CreateLabelWithShadow($text="",$color=0xFFFFFF,$dropcolor=0x000000,$left=0,$top=0,$with=0,$height=0,$fontweight=800,$fontattribute=0,$fontsize=10,$fontname="MS Sans Serif",$drop=2)
GUICtrlCreateLabel($text, $left+$drop,$top+$drop,$with,$height)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, $dropcolor)
GUICtrlSetFont(-1, $fontsize, $fontweight, $fontattribute, $fontname)
GUICtrlCreateLabel($text, $left,$top,$with,$height)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, $color)
GUICtrlSetFont(-1, $fontsize, $fontweight, $fontattribute, $fontname)
EndFunc
