What I need to can set this image with transparency on a button. Should I create a mask or is there another way to do that? Right now the image is on a black background.
AutoIt
#include <GDIPlus.au3> #include <GUIButton.au3> #include <GUIImageList.au3> _GDIPlus_Startup() $hBitmap = _GDIPlus_BitmapCreateFromFile(@ScriptDir & '\tm.png') $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) $hImageList = _GUIImageList_Create(64,64,6) _GUIImageList_Add($hImageList,$hHBITMAP) $hMain = GUICreate("Example") $hButton = GUICtrlCreateButton('',100,100,74,74,0x0800) _GUICtrlButton_SetImageList($hButton,$hImageList,4) $Dummy = GUICtrlCreateInput("",300,300,10,10) GUISetState(@SW_SHOW,$hMain) Do Sleep(20) Until GUIGetMsg() = -3 _GUIImageList_Destroy($hImageList) _WinAPI_DeleteObject($hHBITMAP) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown()
Used image: tm.png