Thread: SetLayeredWindowAttributes

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    18

    SetLayeredWindowAttributes

    Okay, I'm trying to create translucent windows.. I have the following code to achieve this (directly from msdn):
    Code:
    SetWindowLong(hwnd, GWL_EXSTYLE,
    	GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
    SetLayeredWindowAttributes(hwnd, 0, (255 * 70) / 100, LWA_ALPHA);
    The problem is I get these errors: SetLayeredWindowAttributes/WS_EX_LAYERED/LWA_ALPHA undeclared identifier...

    I don't know what header file I'm supposed to include.. can anybody help me with this please??

    thanks in advance..
    Last edited by void; 10-21-2002 at 06:19 PM.
    ~void

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    You might have to import that function from a library file, USER32.DLL.

    Per-Erik Nordlund wrote an article on transparency in Win2k.

    http://www.codeproject.com/w2k/win2k_transparent.asp

    Kuphryn
    Last edited by kuphryn; 10-21-2002 at 08:03 PM.

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    18
    Thanks
    *adds to favorites*
    ~void

Popular pages Recent additions subscribe to a feed