flat assembler
Message board for the users of flat assembler.
Index
> Windows > Toolbar trouble Goto page Previous 1, 2 |
Author |
|
Teehee 31 Dec 2009, 18:58
i'm not sure. i think its working to ToolBar's Handle, but i need to get TBN_DROPDOWN notification.
|
|||
31 Dec 2009, 18:58 |
|
Teehee 01 Jan 2010, 13:24
Now, With the lesson of revolution, i get TBN_DROPDOWN notif.
Code: .wm_notify: mov eax, [lparam] ; [lparam] = pointer to NMHDR struct mov ebx, [hToolBar] cmp [eax+ NMHDR.hwndFrom],ebx jne @f cmp [eax+NMTOOLBAR.hdr.code],TBN_DROPDOWN jne @f ; detect which button was pressed ; cmp [eax+NMTOOLBAR.iItem], ID_BUTTON (TBBUTTON.idCommand field) @@: jmp .finish0 Thank you rev. Last edited by Teehee on 02 Jan 2010, 14:34; edited 2 times in total |
|||
01 Jan 2010, 13:24 |
|
Teehee 01 Jan 2010, 15:33
How can I put trasparent images on toolbar button?
I did: Code: ; ; Create Image List : IDB_TEST = .bmp resource index ; invoke ImageList_Create, 32, 32, ILC_COLOR24, 1, 0 ; +ILC_MASK mov [hImageList], eax invoke SendMessage,[hToolBar],TB_SETIMAGELIST,0,[hImageList] invoke SendMessage,[hToolBar],TB_LOADIMAGES, 0,[hImageList] invoke LoadImage,[wc.hInstance],IDB_TEST,IMAGE_BITMAP,32,32,LR_DEFAULTCOLOR+LR_LOADTRANSPARENT mov ebx, eax ; ebx = hImage invoke ImageList_Add,[hImageList],ebx,NULL invoke DeleteObject,ebx LR_LOADTRANSPARENT does not making my image transparent. (I tried with 3 differents background colors) PS: using ILC_MASK it works, but i'd like to know if there is another simple way, like LR_LOADTRANSPARENT propose. |
|||
01 Jan 2010, 15:33 |
|
Teehee 01 Jan 2010, 16:46
nvm..
I found this solution: Code: invoke ImageList_LoadImage,[wc.hInstance],IDB_TEST,32,0,CLR_DEFAULT,IMAGE_BITMAP,LR_DEFAULTCOLOR+LR_CREATEDIBSECTION+LR_LOADTRANSPARENT invoke SendMessage,[hToolBar],TB_SETIMAGELIST,0,eax |
|||
01 Jan 2010, 16:46 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.