Board index » off-topic » Bitmap not shown
Ivan Kossey
Delphi Developer |
Bitmap not shown2007-01-24 07:28:00 AM off-topic11 Hi All, I try to display a bitmap on the main window. It is shown well when I place the following commands BEFORE creating main window but not AFTER its creating. I must change the image during execution but I cannot :-( All calls seem to be successful, they return "normal" results, not zero. Thanks for any suggestion. Ivan ;CALL BeginPaint,hWin,OFFSET Ps ; Ps: PAINTSTRUCT ; called if placed in WM_PAINT event routine. INT 3 CALL GetDC,hMainWindow mov hDC, eax CALL CreateCompatibleDC,EAX ; hDC MOV hMemDC,EAX ;CALL DeleteObject,hMainBitmap ; deleting and new creation does not help ;CALL CreateBitmapIndirect,OFFSET BitmapStru ;MOV hMainBitmap,EAX CALL SelectObject,hMemDC,hMainBitmap CALL BitBlt,hDC,10,220,BitmapStru.bmWidth,BitmapStru.bmHeight,hMemDC, 0, 0,SRCCOPY CALL DeleteDC,hMemDC ;CALL EndPaint,hWin,OFFSET Ps ;CALL UpdateWindow,hMainWindow ; DOES NOT HELP |