hi, what is hImage (ImageHandle) when I use the following code:

invoke LoadBitmap,hInstance,1000
invoke SendMessage,statichandle,BM_SETIMAGE,IMAGE_BITMAP,eax
the alternative would be PostMessage, but this doesn't work, too. in the api-reference the last parameter should be hImage, but what exactly is hImage? can't i use a DC that should be displayed in the static box? this is the code i create my staticbox with:

invoke CreateWindowEx,WS_EX_CLIENTEDGE,addr staticclass,NULL,
                WS_CHILD or WS_VISIBLE or SS_BITMAP,0,0,200,20,hWin,0,hInstance,0
thanks for your help. bye
Posted on 2001-04-03 14:27:00 by [SaFc0n]
, I'd say that code look alright. Maybe the ID of the bitmap in the resource isn't 1000? The imagehandle is the return from LoadBitmap (stored in eax) so there shouldn't be any problem with it. You could try to use .data? hBmp dd ? and invoke LoadBitmap,hInstance,1000 mov hBmp, eax invoke SendMessage,statichandle,BM_SETIMAGE,IMAGE_BITMAP,hBmp Just a thought =) //Phrekie
Posted on 2001-04-03 14:52:00 by Phrekie
, just another idea, i had a similar problem but with buttonclass as class. I was wrong about the button style. Be sure you have BS_BITMAP (equ 80h) included in the style. I'm using 52000080h as style. Hope it help
Posted on 2001-04-03 16:52:00 by angelo
You're using a STATIC control? You should be sending a STM_SETIMAGE message.
Posted on 2001-04-03 17:39:00 by tank