Thread: TransparentBlt()

  1. #1
    Banned SniperSAS's Avatar
    Join Date
    Aug 2005
    Posts
    175

    TransparentBlt()

    Quick Question here:
    Regarding TransparentBlt(), what do I need to do to use this function?

    I have windows.h included, and I have my projected linked to Msimg32.lib just like msdn says and I still can't use it.

    The msdn page for this function is here

    Is the answer right in front of my face? This has me completely stumped.

    edit- VV D'oh VV
    Last edited by SniperSAS; 03-03-2006 at 10:20 PM.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    You've linked to AlphaBlend and not TransparentBlt.

    >>and I still can't use it<<

    Please include any error messages as this is meaningless.

    >>Is the answer right in front of my face?<<

    It will be when you open up the header file in which TransparentBlt is declared and locate that function within it.

    If that seems too cryptic then a board search should offer some clarification - I'm fairly certain this question has been asked and answered before.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Banned SniperSAS's Avatar
    Join Date
    Aug 2005
    Posts
    175
    Quote Originally Posted by Ken Fitlike

    Please include any error messages as this is meaningless.
    `TransparentBlt' undeclared (first use this function)

    Quote Originally Posted by Ken Fitlike

    It will be when you open up the header file in which TransparentBlt is declared and locate that function within it.
    Maybe I'm stupid but I don't see how finding where the function is declared would help, MSDN says to include windows.h and I did.

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Well, since you're not going to look at either the file or search the board for yourself.

    Quote Originally Posted by wingdi.h
    #if (WINVER >= 0x0500)
    WINGDIAPI BOOL WINAPI TransparentBlt(...);
    #endif
    (more or less).

    Board search: TransparentBlt error.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    Banned SniperSAS's Avatar
    Join Date
    Aug 2005
    Posts
    175
    Quote Originally Posted by Ken Fitlike
    Well, since you're not going to look at either the file or search the board for yourself.

    (more or less).
    I saw that in the file! I didn't know what it meant, sorry

    I didn't search the board though sorry again

  6. #6
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>I didn't know what it meant<<

    Fair enough.

    You need to #define WINVER 0x0500 before you #include <windows.h>, otherwise when your program is compiled the function is not declared - hence the error message you got. It's actually better to set it in whatever preprocessor setting your compiler has (check its documentation) but for smaller projects (one or so files) you can get away without doing so.

    I think this is mentioned in the search link I provided, together with a link to further preprocessor definitions that are important when programming for windows which you may find of interest.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  7. #7
    Banned SniperSAS's Avatar
    Join Date
    Aug 2005
    Posts
    175
    Quote Originally Posted by Ken Fitlike
    >>I didn't know what it meant<<

    Fair enough.

    You need to #define WINVER 0x0500 before you #include <windows.h>, otherwise when your program is compiled the function is not declared - hence the error message you got. It's actually better to set it in whatever preprocessor setting your compiler has (check its documentation) but for smaller projects (one or so files) you can get away without doing so.

    I think this is mentioned in the search link I provided, together with a link to further preprocessor definitions that are important when programming for windows which you may find of interest.
    Yup, it works now. Thanks for putting up with my stupidity.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. transparentblt
    By h_howee in forum Windows Programming
    Replies: 4
    Last Post: 09-13-2006, 02:10 PM
  2. TransparentBlt error
    By jmd15 in forum Windows Programming
    Replies: 3
    Last Post: 08-29-2005, 08:22 PM
  3. TransparentBlt
    By rEtard in forum Windows Programming
    Replies: 2
    Last Post: 04-13-2005, 04:00 AM
  4. TransparentBlt
    By Trauts in forum Windows Programming
    Replies: 2
    Last Post: 02-27-2003, 07:40 PM