TransparentBlt problem

Started by
4 comments, last by Godlike 19 years, 7 months ago
When I use the TransparentBlt I get this error from the C++ Builder 6 linker. [Linker Error] Unresolved external 'TransparentBlt' referenced from C:\MY PROJECTS\BUILDER\2D GAME (ON GODLIKE'S FRAMEWORK)\UNIT1.OBJ Does anyone knows what I do wrong because I've tried to use this function and throught Visual C++ 6 and a got the same error.
-----------------------My Page: † AncienT RituaL †
Advertisement
Hi!
A linker error appears if something went wrong with
the linkage to libraries.
I think the function TransparentBlt is in some *.lib
you explicitely need to specify in the options of your compiler/linker.
Do you have Msimg32.lib included as a link library in your project?

Try putting

#pragma library("Msimg32.lib")

...in your code.
---PS3dev
I've tried the #pragma library("msimg32.lib") but I get the same error. The function is defined into the windows.h what else should I do?
-----------------------My Page: † AncienT RituaL †
That pragma is for MSVC and probably won't work with BCB. Make sure your linker is set up to link to msimg32.lib (which is what the pragma instructs msvc to do).

Also, consider not using TransparentBlt. It's buggy on older Windows versions (98, ME) in that it doesn't give correct results and leaks memory. You could probably roll your own just as well.
Kippesoep
Basically the thing I want to do is to draw bitmaps with transparent parts into the screen using the Win32 API only. Until now I was drawing with the help of a masked bitmap using StretchBlt. Can I use something else?
-----------------------My Page: † AncienT RituaL †

This topic is closed to new replies.

Advertisement