I'm trying out the Windows API, and I've run into a lot of problems. The most recent is this: I included Windows.h, and temporarily Winuser.h, yet the MonitorFromWindow (and the associated fields, like MONITOR_DEFAULTTONEAREST) are missing. Specifically,
...'MONITOR_DEFAULTTONEAREST' was not declared in this scope
and
...'MonitorFromWindow' was not declared in this scope.
Other methods show up just fine, like LoadImage and CreateWindow. Is there some inclusion I'm missing? I don't think it's the way I've called the methods, or even the way I included the header files, but if you ask, I can still post my code. There's not much of it.
Edit: when I check what is defined in the scope, the nearest methods are ModifyWorldTransform(...) and MonikerCommonPrefixWith(...); the nearest fields all begin with MONITOR_INFO, except for MONITOR_ENUMPROC. No MONITOR_DEFAULTTONEAREST/NULL/etc.
Edit 2:
#define UNICODE
#define _WIN32_WINNT 0x0500
#include <iostream>
#include <process.h>
#include <windows.h>
#include <winuser.h>
...
HMONITOR monitor = NULL;
HWND CreateFullScreenWindow(HWND hwnd){
if(monitor==NULL){
monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
}
return hwnd;
}