is there a way to place bitmaps on buttons on a dialog (built using radasm).. since creating buttons at run time is not needed or desired.. do I:

- getdlgitem's hwnd
- createdc for button's hwnd
- blit bmp to it

or can I specify that in the resource file? Or can I use the toolbar in some way (from donkey's program) to do this?
Posted on 2003-09-16 11:33:27 by drarem
This is the way I do it:
(Hope I got what you want)

invoke LoadBitmap,hInstance,201
invoke SendDlgItemMessage,hWin,ButtonID,BM_SETIMAGE,IMAGE_BITMAP,eax
Posted on 2003-09-16 13:18:53 by ChigpA
Thanks, it works great :)

I have the following per your suggestions:

invoke LoadBitmap,hInstance,2001 ;2001 = ID of IDB_BRUSH1
invoke SendDlgItemMessage,hWin,IDC_BTN1,BM_SETIMAGE,IMAGE_BITMAP,eax ;1002 = ID of button

and in the resource file, I had to include BS_BITMAP which is 0x00000080L..

CONTROL "",IDC_BTN1,"Button",NOT 0x00820000|0x50010000|0x00000080L,2,1,20,19,0x00000000


It is defined in Resource.h but I don't have that included so I opted for hardcoding :)
Posted on 2003-09-16 14:13:43 by drarem