Click to See Complete Forum and Search --> : SetLayeredWindowAttributes not recognized!


leojose
July 13th, 2005, 06:45 AM
HI all,

I am trying to use the function SetLayeredWindowAttributes() but unfortunately MSVC doesn't recognize it
I use VC++v6.0 with Windows Server 2003 SP1 SDK installed.
i have also include windows.h, user32.lib as defined in MSDN, but no hope.

What could be the problem?

hspc
July 13th, 2005, 07:01 AM
did u install the latest Platform SDK ?

Marc G
July 13th, 2005, 07:03 AM
SetLayeredWindowAttributes is defined in winuser.h inside a conditional statement. Define _WIN32_WINNT to be at least 0x0500 and it should work.

leojose
July 13th, 2005, 07:17 AM
Hey MarcG,

Your suggestion worked!


Thanks :)

Marc G
July 13th, 2005, 09:16 AM
You are welcome. :)
Don't forget that layered windows only work on Windows 2000, XP or later.