::UpdateLayeredWindow, apparently not declared
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
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".
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
#define _WIN32_WINNT 0x0500
#define WINVER 0x0500
Look here for more information
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement