User forums > Using Code::Blocks

Problem with TransparentBlt

<< < (2/2)

Vampyre_Dark:
It's supported only in Win98 and above. Did you define a windows version? Try searching for the function in WINGDI.h and see if it's only defined if you have WIN98 or greater defined as your windows version.

Actually, MS says you shouldn't use that function, and has an article on how to make transparent blits.

http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B79212

Pheaj:
I came across this and it talks about the order things are called up when linking in g++

http://sourceforge.net/forum/forum.php?thread_id=1305898&forum_id=286641

Pheaj:
Well, I got it to work.  I took the if statement out of wingid.h




--- Code: ---#if (WINVER >= 0x0500)
BOOL WINAPI AlphaBlend(HDC,int,int,int,int,HDC,int,int,int,int,BLENDFUNCTION);
BOOL WINAPI GradientFill(HDC,PTRIVERTEX,ULONG,PVOID,ULONG,ULONG);
BOOL WINAPI TransparentBlt(HDC,int,int,int,int,HDC,int,int,int,int,UINT);
#endif
--- End code ---

Haven't figured out why it isnt' reading the correct version of windows yet.

How about

--- Code: ---#define  WINVER  0x0500
--- End code ---


Then I had problems with the linking.  If figured out that too.  Woohoo a good day.

Thanks
drew

Vampyre_Dark:
Were you defining that WINVER value before including windows.h? Otherwise it'd be useless.

Mirycia:
hi griend where you put this code in any .H or where salutes ;D




--- Code: ---#if (WINVER >= 0x0500)
BOOL WINAPI AlphaBlend(HDC,int,int,int,int,HDC,int,int,int,int,BLENDFUNCTION);
BOOL WINAPI GradientFill(HDC,PTRIVERTEX,ULONG,PVOID,ULONG,ULONG);
BOOL WINAPI TransparentBlt(HDC,int,int,int,int,HDC,int,int,int,int,UINT);
#endif
--- End code ---

Haven't figured out why it isnt' reading the correct version of windows yet.

How about

--- Code: ---#define  WINVER  0x0500
--- End code ---


Then I had problems with the linking.  If figured out that too.  Woohoo a good day.

Thanks
drew
[/quote]

Navigation

[0] Message Index

[*] Previous page

Go to full version