I'm writing a Win32 application for Windows XP with Visual Studio 2005. It is a console program, and I'm trying to find the HWND attribute of my console. I need this because I need to use it as a parameter for a function.
So, thanks to the MSDN library I found this:
HWND WINAPI GetConsoleWindow(void);
It sounds really simple, but when I try to compile it says GetConsoleWindow is not identified. I looked through wincon.h, where it IS defined, but it is outlined like so:
#if(_WIN32_WINNT >= 0x0500)
WINBASEAPI
HWND
APIENTRY
GetConsoleWindow(
VOID
);
#endif
And, like it told me to, I put this in my code:
#define _WIN32_WINNT 0x0501 // Windows XP = 0501H
I thought that would fix the problem, but it still says identifier not found for GetConsoleWindow(). Does anyone have any ideas?