Hi, i need to display a little bmp image in a window just on a certain event. I would like to do this without calling BeginPaint in the Paint event, becouse this involve paint structures and hdc. Maybe there is an easy way. Thanks Angelo
Dunno if its really any easier, but you could define a dialog resouce with only the bitmap (defined in the resource) then call DailogBoxParam to display the dialog box.. You will need to create a DlgProc.. but you only have to support for messages you need to.. (in this case you will need to initialize the Bitmap labeled in your resouce in a INITDIALOG messaged.. Dialog Proc..
In your resouce file:
.if diMsg==WM_INITDIALOG invoke GetModuleHandle, NULL invoke LoadBitmap, eax, 100 ; resource ref. mov hBitmap, eax invoke GetDlgItem, DWnd, ID_THIS invoke SendMessage,eax,BM_SETIMAGE,IMAGE_BITMAP,hBitmap ... .else xor eax, eax ret .endif mov eax, 1 ret
I didnt test this.. but i think it should work.. NaN
100 BITMAP "nan.bmp" LTEXT "", ID_THIS, 4,52,60,28, BS_BITMAP
Nan thanks a lot, i'm going to try