   Trouble With TransparentBlt() Function
  I've been reading the book Beginning Game Programming, and I've ran into a problem.  When I try to compile pretty much any of the programs, it tells me that the TransparentBlt() function is undeclared.  I double checked to make sure the msimg32 library is included (which is supposedly where TransparentBlt() is defined) and it is, but it still won't compile.If it helps, I'm using the Dev-C++ environment.   
  are you reading the one by Michael Morrison? If so, I there is quite a lot of information on his site.have you included libwinmm.a? i think that's required as wellalso, TransparentBlt has some serious problems in Windows 98, so if you're using 98 then you might run into more problems when it does compile.   ;  I've got libwinmm attached, so that's not the problem.  I'll take a look at that site, though.  And I'm using Windows XP, so that's not the problem either.   ;  since the function is undeclared, check if all the correct headers are included   ;  I'm pretty sure all the headers are included.  I have this problem with every single program containing the TransparentBlt() function, so I think its more than that.   ;  TransparentBlt() has some issues I believe, and you should avoid it whenever possible. It's also pretty slow. However, according to The MSDN, TransparentBlt() is in Msimg32.lib. Is it a linker error you're getting, or a compiler error? If it's a compiler error, you can just protoype it yourself. If it's a linker error, then perhaps the lib isn't valid or something?   ;  I would avoid using it, except I don't know how to.Also, I just opened it and tried to compile it, and it suddenly worked this time when it didn't work before.  I can't think of anything significant I changed, but there was no problems with it going through this time.  What's going on?EDIT: Nevermind, I found something in the program that had been changed at some point when I was tinkering with it, and I just replaced the TransparentBlt() function with BitBlt(), which doesn't work the way I want it to.  And I think its a compiler error, it say "'TransparentBlt' undeclared (first use this function)"   ;  Yup, that's a compiler error. If it's a compile error, the compiler doesn't know what TransparentBlt is, so it can't validate parameters and so on. For some reason, the function isn't getting declared. You could try and work out why, by going through the header or just stick this at the top of a source file or in a header:BOOL TransparentBlt(  HDC hdcDest,   // handle to destination DC  int nXOriginDest,   // x-coord of destination upper-left corner  int nYOriginDest,   // y-coord of destination upper-left corner  int nWidthDest,// width of destination rectangle  int hHeightDest,    // height of destination rectangle  HDC hdcSrc,    // handle to source DC  int nXOriginSrc,    // x-coord of source upper-left corner  int nYOriginSrc,    // y-coord of source upper-left corner  int nWidthSrc, // width of source rectangle  int nHeightSrc,// height of source rectangle  UINT crTransparent  // color to make transparent);(Straight from the MSDN). That should let the compiler find the function declaration.   ;  Okay, now it can find the declaration, but there's a linker error, it says undefined reference.  I'm pretty sure its because it can now find the declaration, but it still doesn't know what the function is supposed to do.   ;  TransparentBlt is declared in wingdi.h, which is included in windows.hOnly it needs WINVER defined to 0x0500 or greater to see itso try #define WINVER 0x0500before including the headerand triple check libmsimg.a is included in the linker options   