dont forget to create dll resource for your icon then test this exemple :
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <Constants.au3>
#include <WinAPI.au3>
Example()
Func Example()
GUICreate("", 400, 380, -1, -1)
GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON)
GUICtrlSetImage(-1, "main.dll", "FINDICO")
GUICtrlCreateButton("my picture button", 50, 20, 40, 40, $BS_ICON)
GUICtrlSetImage(-1, "main.dll", "-2")
GUICtrlCreateButton("my picture button", 90, 20, 40, 40, $BS_ICON)
GUICtrlSetImage(-1, "main.dll", "-3")
GUICtrlCreatePic("", 0, 20, 400, 380)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlSetImageFromDLL(-1, "DLLTest.dll", "-4")
GUISetState()
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
EndFunc ;==>Example
Func GUICtrlSetImageFromDLL($controlID, $filename, $imageIndex)
Local Const $STM_SETIMAGE = 0x0172
$hLib = _WinAPI_LoadLibrary($filename)
$hBmp = _WinAPI_LoadImage($hLib, $imageIndex, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR)
GUICtrlSendMsg($controlID, $STM_SETIMAGE, $IMAGE_BITMAP, $hBmp)
_WinAPI_FreeLibrary($hLib)
_WinAPI_DeleteObject($hBmp)
EndFunc ;==>GUICtrlSetImageFromDLL