Sign in to follow this  
sokken

::UpdateLayeredWindow, apparently not declared

Recommended Posts

sokken    122
Hi Ive been doing some simple win32 stuff, using regions. I had some problems (have rather) and was looking for answers when i came across UpdateLayeredWindow() and SetLayeredWindowAttributes(). So i decided i wanted to try using UpdateLayeredWindow().. declared in winuser.h, include windows.h - check import library user32.lib - check Im not manually importing user32.lib, im suspecting dev-c++ of being nice to me, because it works for everything else. I still get "'::UpdateLayeredWindow()' has not been declared" when i try to compile.. Ive rummaged around MSDN a fair bit, and read what appeared to be a good introduction to this piece of API, but didnt really find anything there that could hint to a soloution. Im using dev-c++ v4.9.9.2, sporting the mingW v3.4.2 compiler. If anyone can help me whith this its greatly appreciated /sok

Share this post


Link to post
Share on other sites
Bezben    202
I think you might have to define your windows version, the layered stuff is win2k+ only IIRC. Try #defining _WIN32_WINNT 0x0501 before you #include "windows.h".

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Because those are newer API functions they are only supported in Windows 2000 and above, so you have to #define certain macros:

#define _WIN32_WINNT 0x0500
#define WINVER 0x0500

Look here for more information

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
My link didnt work right, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/using_the_windows_headers.asp should have the all the information you need.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this