Jump to content
  • Advertisement
Sign in to follow this  
sokken

::UpdateLayeredWindow, apparently not declared

This topic is 4641 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!