News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

ImageList_Add doesn't accept the mask

Started by xandaz, February 03, 2021, 03:53:28 AM

Previous topic - Next topic

xandaz

    Hi guys. I'm using ImageList_add and the mask doesn't seem to work.loop_1:
push ecx
invoke LoadBitmap,hInstance,edi
mov hBmp,eax
inc edi
invoke LoadBitmap,hInstance,edi
mov hMask,eax
invoke ImageList_Add,hIml,hBmp,eax
invoke DeleteObject,hBmp
invoke DeleteObject,hMask
inc edi
pop ecx
loop loop_1

Why does anyone think this is happening?

six_L

invoke LoadBitmap,hInstance,IDC_BMP1
mov hStyleBE_1,eax
invoke LoadBitmap,hInstance,IDC_BMP2
mov hStyleBE_2,eax
invoke LoadBitmap,hInstance,IDC_BMP3
mov hStyleBE_3,eax


invoke ImageList_Create, 32, 32, ILC_COLOR32, 1, 0
mov hImageList, eax
invoke ImageList_Add, hImageList, hStyleBE_1, NULL
invoke ImageList_Add, hImageList, hStyleBE_2, NULL
invoke ImageList_Add, hImageList, hStyleBE_3, NULL
invoke SendMessage, hButtE, TB_SETIMAGELIST, 0, hImageList

invoke ImageList_Create, 16, 16, ILC_COLOR24 + ILC_MASK, 16, 0
mov hImageList, eax
invoke LoadBitmap, hInstance, IDI_NRM_BITMAP
push eax ; for DeleteObject
invoke ImageList_AddMasked, hImageList, eax, 0ff00ffh
pop eax
invoke DeleteObject,eax
invoke SendMessage, hwndTab, TCM_SETIMAGELIST, 0, hImageList
Say you, Say me, Say the codes together for ever.

xandaz

   Thanks six_L. It was the ILC_MASK member