#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$hGUI = GUICreate("_GUICtrlCreateButtonEx")
$aButton = _GUICtrlCreateButtonEx("Click Me here", 50, 80, -1, 30, "shell32.dll", -5)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $aButton[1]
;
EndSwitch
WEnd
Func _GUICtrlCreateButtonEx($sText, $iLeft, $iTop, $iWidth, $iHeight, $sIconFile="", $nIconIndex=0)
Local $aRetArr[2]
$aRetArr[0] = GUICtrlCreateIcon($sIconFile, $nIconIndex, $iLeft + 5, $iTop + (($iHeight - 16) / 2), 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$aRetArr[1] = GUICtrlCreateButton(" " & $sText & " ", $iLeft, $iTop, $iWidth, $iHeight, $WS_CLIPSIBLINGS)
Return $aRetArr
EndFunc