hi, what is hImage (ImageHandle) when I use the following code:
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 LoadBitmap,hInstance,1000 invoke SendMessage,statichandle,BM_SETIMAGE,IMAGE_BITMAP,eax
thanks for your help. bye
invoke CreateWindowEx,WS_EX_CLIENTEDGE,addr staticclass,NULL, WS_CHILD or WS_VISIBLE or SS_BITMAP,0,0,200,20,hWin,0,hInstance,0
, 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
, 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
You're using a STATIC control? You should be sending a STM_SETIMAGE message.