Sorry that I suggested a futility, since I was not aware of this issue. On the other hand, as @pixelsearch pointed out nicely, there is a solution. Of course (again), you can use the large UDF, but I was curious how to handle it simply and easily :
#AutoIt3Wrapper_Res_File_Add=48x48.ico, RT_ICON, ICON_1
#include <GUIConstants.au3>
#include <WinAPISys.au3>
Example()
Func Example()
Local $hGUI = GUICreate("Example", 300, 200)
Local $idLabel = GUICtrlCreateLabel("@Compiled = " & @Compiled, 10, 10)
Local $idButton_Icon = GUICtrlCreateButton("", 117, 67, 66, 66, $BS_ICON)
If @Compiled Then
Local $hInstance = _WinAPI_GetModuleHandle(Null)
Local $hResource = _WinAPI_LoadImage($hInstance, "ICON_1", $IMAGE_ICON, 0, 0, 0)
GUICtrlSendMsg($idButton_Icon, $BM_SETIMAGE, $IMAGE_ICON, $hResource)
Else
GUICtrlSetImage($idButton_Icon, "48x48.ico")
EndIf
Local $idButton_Close = GUICtrlCreateButton("Close", 210, 170, 85, 25)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $idButton_Close
ExitLoop
EndSwitch
WEnd
EndFunc ;==>Example