• Advertisement
Sign in to follow this  

TransparentBlt problem

This topic is 4905 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
Do you have Msimg32.lib included as a link library in your project?

Try putting

#pragma library("Msimg32.lib")

...in your code.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement