I need to make a program using TransparentBlt(), and thus I need the msimg32.lib library. The problem is that I can't figure out how to add msimg32.lib to my libraries. I'm using Code::Blocks, and I assume that it comes standard with Code::Blocks.
If this is any help, a book on programming I have has instructions for how to add msimg32.lib on Microsoft Visual Studio:
1. Open the project in Visual Studio (Visual C++).
2. Right-click on the project's folder in Solution Explorer and click Properties in the pop-up window.
3. Click the Linker folder in the left pane of the Properties window and then click Input.
4. Click next to Additional Dependencies in the right pane and type msimg32.lib.
5. Click the OK button to accept the changes to the project.
@ modoran: I get the "undeclared identifier" compiler error.
@ sahzz: If I add that I get an error at #if defined... saying "missing binary operator before token '0x0400' "
You need to define WINVER 0x410 (or greater) as a global macro.
TransparentBlt & Co. were added with Windows 98, which 0x410 stands for.
To do this in Code::Blocks, add WINVER=0x0410 to #defines in Build Options.
FORCING the definition of the Windows version isn't going to help. That is a global macro setup so that the compiler knows what versions of what files to use when operating. What are you hoping to accomplish with that except to create MORE issues later down the road?
FORCING the definition of the Windows version isn't going to help.
Huh? Of course it is. If you do not set WINVER/_WIN32_WINNT accordingly, the appropriate function declarations of newer WinAPI functions (those that were introduced after Windows 95) will not be included.
Why hasn't anyone asked the OP if they have included "WinGdi.h"?
What for? windows.h is guaranteed to include wingdi.h, so that would be redundant.
I don't think you understand. WINVER denotes to minimum Windows version you wish to support, not your own.
You can compile a program for Windows 7 on a Windows 95 machine just fine - in fact, you don't need Windows at all.