I am having problems with this function. When I use BitBlt, it works fine; however, when I try MaskBlt, it fails. Even if I try not passing a mask (which according to win32.hlp should be the same as BitBlt), the function still fails. The error code I get is 120 (ERROR_CALL_NOT_IMPLEMENTED). Here is my code:



.IF uMsg==WM_CREATE
invoke LoadBitmap,hInstance,addr szBMPaddle
mov hBmPaddle,eax

invoke GetDC,hWnd
mov hDC,eax
invoke CreateCompatibleDC,eax
mov hDC2,eax
invoke SelectObject,hDC2,hBmPaddle
invoke ReleaseDC,hWnd,hDC

...

.ELSEIF uMsg==WM_PAINT
invoke BeginPaint,hWnd,addr ps

mov eax,rectPaddle.bottom
sub eax,rectPaddle.top
mov edx,rectPaddle.right
sub edx,rectPaddle.left
;invoke BitBlt,ps.hdc,rectPaddle.left,rectPaddle.top,edx,eax,hDC2,0,0,SRCCOPY
mov ecx,SRCCOPY
shl ecx,8
and ecx,0FF000000h
or ecx,SRCCOPY
invoke MaskBlt,ps.hdc,rectPaddle.left,rectPaddle.top,edx,eax,hDC2,0,0,hBmPaddleMask,0,0,ecx

invoke EndPaint,hWnd,addr ps

...


Any help would be appreciated. Thanks.
Posted on 2004-11-12 15:48:59 by sirchess
From MSDN:
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Unsupported.
Posted on 2004-11-13 01:09:38 by death
Oh...well that explains it :oops:

Didn't think to check MSDN...my (old) copy of win32.hlp says nothing about it being unsupported.

Anyone know another way to make part of a bitmap transparent using a mask or similar?
Posted on 2004-11-14 22:41:16 by sirchess
You could try my library, I think I posted the source under the Forum Index: Recruitment. Look for my most recent post on developing a GDI library.

if you want to, I could use some help in developing it further.
Posted on 2004-11-15 10:39:04 by drarem