Hy to all,

I was searching for a function of the GDI to realize a simple sprite animation when I found this function that is exactly what I was searching for...

This is reported to be a buggy function on Win 98/Me so it is not very famous (M$ advice is to use a monochromatic DC...see on their site).

I realized the sample program in Visual Basic on W2000 and this is the funtion declaration :


Public Declare Function TransparentBlt Lib "Msimg32.dll" _
(ByVal hdcDest As Long, ByVal nXOriginDest As Long, ByVal nYOriginDest As Long, _
ByVal nWidthDest As Long, ByVal hHeightDest As Long, _
ByVal hdcSrc As Long, ByVal nXOriginSrc As Long, ByVal nYOriginSrc As _
Long, ByVal nWidthSrc As Long, ByVal nHeightSrc As Long, ByVal crTransparent As Long) As Boolean

The question is, how can I use this in MASM32 ? It doesn't seem to me that it is declared in window.inc or gdi.inc so I don't know how I can refer to this function in that library...

I don't think it should be very difficult because I have that DLL on my system...can you show me the way ?

Thanks,

fooCoder
Posted on 2002-05-15 03:46:21 by fooCoder



Public Declare Function TransparentBlt Lib "Msimg32.dll" _


It's in Msimg32.dll. As expected, it's declared in 'msimg32.inc.' Or rather, it SHOULD be declared there, my version declares it.
Posted on 2002-05-15 08:46:56 by AmkG
I did not know this api exists. I was looking for how to write something that did a transparent blt, and I found the source code for a function "TransparentBlt" on msdn, so I believe that it what it is.

It works, by the way, at least for me.
Posted on 2002-05-15 10:42:19 by Ronin Magus
Check out this Thread : Thread....

It At the very end it has a transparent blt function that i wrote with the help of Ernie. Works quite well, and can be modified to suit your needs.

NaN
Posted on 2002-05-15 12:50:31 by NaN
Nice thread NaN!

Maybe I'll find a use for that routine...
Posted on 2002-05-15 18:45:13 by AmkG
Ya, its my hope Hutch will add it to the next MASM32.Lib /package.

:NaN:
Posted on 2002-05-15 19:16:31 by NaN
Thank you guys!!

NaN, your routine is very good!

I checked for TransparentBlt, it is declared in : msimg32.inc

Bye,
fooCoder
Posted on 2002-05-16 03:15:25 by fooCoder
The point was to avoid using TransparentBlt, as it is only supported on limited versions of Windows (think 98 and above ?).

But thanx you anyways... Half the credit goes to Ernie tho, who dug up the source to begin with ;)

:alright:
NaN
Posted on 2002-05-16 04:36:13 by NaN