Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem with SetLayeredWindowAttributes ()

Problem with SetLayeredWindowAttributes ()

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpc++visual-studio
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jijo Raj
    wrote on last edited by
    #1

    Hai all, i was just practicing Layered Windows. So i created an MFC dialog based application and then proceeded. But when i try to call SetLayeredWindowAttributes () function, i got an error that the compiler cant find the function. When i look MSDN, the function is defined in windows.h and as its an MFC app, i think that there is no need for including windows.h header file. But my compiler is stilling telling the error that it cant find the function. I had latest platform SDK installed and the Include path of visual studio is also updated. Im working in Windows XP. Please help me. Regards, Jijo. ;) ________________________________ Yesterday is history, Tomorrow is a mystery, But today is a present.

    G 1 Reply Last reply
    0
    • J Jijo Raj

      Hai all, i was just practicing Layered Windows. So i created an MFC dialog based application and then proceeded. But when i try to call SetLayeredWindowAttributes () function, i got an error that the compiler cant find the function. When i look MSDN, the function is defined in windows.h and as its an MFC app, i think that there is no need for including windows.h header file. But my compiler is stilling telling the error that it cant find the function. I had latest platform SDK installed and the Include path of visual studio is also updated. Im working in Windows XP. Please help me. Regards, Jijo. ;) ________________________________ Yesterday is history, Tomorrow is a mystery, But today is a present.

      G Offline
      G Offline
      GDavy
      wrote on last edited by
      #2

      don^t know which MSDN library you looked at but mine says it is declared in wingdi.h AND you need to link to the library user32.lib hope this helps you

      J 1 Reply Last reply
      0
      • G GDavy

        don^t know which MSDN library you looked at but mine says it is declared in wingdi.h AND you need to link to the library user32.lib hope this helps you

        J Offline
        J Offline
        Jijo Raj
        wrote on last edited by
        #3

        Thanks for the reply. But the solution was not that. Just now i got the solution. I searched the header files for SetLayeredWindowAttributes constants and found that they are only defined if the _WIN32_WINNT is >= 0x0500 #if(_WIN32_WINNT >= 0x0500) #define WS_EX_LAYERED 0x00080000 #endif /* _WIN32_WINNT >= 0x0500 */ so i just added #define _WIN32_WINNT 0x0500 and it worked... ;) And i dont know whether its the right method. Regards, Jijo. ________________________________ Yesterday is history, Tomorrow is a mystery, But today is a present.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups