I searched the forum for an easy way to create a bitmap window and failed.

What I want to do is have a logo for my window. I've tried creating a static window and using sendmessage to load a bitmap in it, though it didn't work. i need a sample.

Thanks.
Posted on 2003-07-07 18:03:45 by ESP
I've got it to work

Here is an example:

StaticImage proc lpText:DWORD,hParent:DWORD,
a:DWORD,b:DWORD,wd:DWORD,ht:DWORD,ID:DWORD

; invoke StaticImage,NULL,hWnd,20,20,100,25,500

invoke CreateWindowEx,WS_EX_STATICEDGE,
ADDR statClass,lpText,
WS_CHILD or WS_VISIBLE or SS_BITMAP,
a,b,wd,ht,hParent,ID,
hInst,NULL

ret

StaticImage endp

invoke StaticImage,NULL,Handle,20,20,50,200,65535
mov hbitmap,eax
invoke LoadBitmap,hInst,1337
mov hBmp1,eax
invoke SendMessage,hbitmap,STM_SETIMAGE,IMAGE_BITMAP,hBmp1
Posted on 2003-07-07 18:12:53 by ESP