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. 'WS_EX_LAYERED' : undeclared identifier

'WS_EX_LAYERED' : undeclared identifier

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 Posts 3 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.
  • S Offline
    S Offline
    Sprudling
    wrote on last edited by
    #1

    Why am I getting this error? I've got Windows XP and I just downloaded and installed the Platform SDK from Microsoft's website (I didn't include the 64bits stuff thought). In MSDN (July 2000) says that WS_EX_LAYERED is for Windows 2000 only, but don't that include XP too; or doesn't it? Anyway, if this really is just for Windows 2000, how do I create transparent windows and fancy stuff like that? Sprudling :confused: PS! I have the same problem with the function 'SetLayeredWindowAttributes', which also requires Windows 2000.

    R 1 Reply Last reply
    0
    • S Sprudling

      Why am I getting this error? I've got Windows XP and I just downloaded and installed the Platform SDK from Microsoft's website (I didn't include the 64bits stuff thought). In MSDN (July 2000) says that WS_EX_LAYERED is for Windows 2000 only, but don't that include XP too; or doesn't it? Anyway, if this really is just for Windows 2000, how do I create transparent windows and fancy stuff like that? Sprudling :confused: PS! I have the same problem with the function 'SetLayeredWindowAttributes', which also requires Windows 2000.

      R Offline
      R Offline
      Rick York
      wrote on last edited by
      #2

      In the on-line MSDN, it says W2000/XP. XP was not out yet in July 2000. I checked my version of winuser.h and I don't have it defined. I have found that when you have version-specific definitions they are usually protected by target version macros. Check your headers (find in files) for WS_EX_LAYERED and see what target version macros it is hidden by and then define them in your project options. Usually the macro is of the form (WINVER >= 0x0z00). If you define WINVER to be 0x0500 then you should be okay. This will target W2000 which could cause problems if your app is to run on earlier versions.

      S 1 Reply Last reply
      0
      • R Rick York

        In the on-line MSDN, it says W2000/XP. XP was not out yet in July 2000. I checked my version of winuser.h and I don't have it defined. I have found that when you have version-specific definitions they are usually protected by target version macros. Check your headers (find in files) for WS_EX_LAYERED and see what target version macros it is hidden by and then define them in your project options. Usually the macro is of the form (WINVER >= 0x0z00). If you define WINVER to be 0x0500 then you should be okay. This will target W2000 which could cause problems if your app is to run on earlier versions.

        S Offline
        S Offline
        Sprudling
        wrote on last edited by
        #3

        Now I understand... The headers included with VS 6.0 didn't define WS_EX_LAYERED anywhere. However 'winuser.h' in the Microsoft SDK directory did. I thought the Platform SDK somehow integrated itself to VS 6.0. Atleast it told me it did when I installed it, but I guess that didn't work. So, how do I do this manually? Sprudling

        S M 2 Replies Last reply
        0
        • S Sprudling

          Now I understand... The headers included with VS 6.0 didn't define WS_EX_LAYERED anywhere. However 'winuser.h' in the Microsoft SDK directory did. I thought the Platform SDK somehow integrated itself to VS 6.0. Atleast it told me it did when I installed it, but I guess that didn't work. So, how do I do this manually? Sprudling

          S Offline
          S Offline
          Sprudling
          wrote on last edited by
          #4

          Nevermind... It was actually integrated to VS 6.0. I was just me not defining _WIN32_WINNT to something like 0x0500 or above. Thank you =) Sprudling

          1 Reply Last reply
          0
          • S Sprudling

            Now I understand... The headers included with VS 6.0 didn't define WS_EX_LAYERED anywhere. However 'winuser.h' in the Microsoft SDK directory did. I thought the Platform SDK somehow integrated itself to VS 6.0. Atleast it told me it did when I installed it, but I guess that didn't work. So, how do I do this manually? Sprudling

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #5

            Your answer's in the VC forum FAQ. --Mike-- "Everyone has figured out what 'service pack' really means, so they had to go and change the language. Perhaps this is what Bill was talking about in the 'security is top priority' letter."   -- Daniel Ferguson, 1/31/2002 My really out-of-date homepage Sonork - 100.10414 AcidHelm Big fan of Alyson Hannigan.

            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