CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2005
    Posts
    399

    Unhappy SetLayeredWindowAttributes not recognized!

    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?

  2. #2
    Join Date
    Apr 2002
    Location
    Egypt
    Posts
    2,210

    Re: SetLayeredWindowAttributes not recognized!

    did u install the latest Platform SDK ?
    Hesham A. Amin
    My blog , Articles


    <a rel=https://twitter.com/HeshamAmin" border="0" /> @HeshamAmin

  3. #3
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: SetLayeredWindowAttributes not recognized!

    SetLayeredWindowAttributes is defined in winuser.h inside a conditional statement. Define _WIN32_WINNT to be at least 0x0500 and it should work.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  4. #4
    Join Date
    May 2005
    Posts
    399

    Re: SetLayeredWindowAttributes not recognized!

    Hey MarcG,

    Your suggestion worked!


    Thanks

  5. #5
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: SetLayeredWindowAttributes not recognized!

    You are welcome.
    Don't forget that layered windows only work on Windows 2000, XP or later.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured