Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

ImageList bitmap mask

$
0
0

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

msg-34516-0-74412000-1374604487.png


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>