オフかどうかを確認するためにモニターを取得しようとしています。
で確認する前にGetDevicePowerState
、次の方法でモニターを取得しようとしています。
#include <cstdlib>
#include <iostream>
#include <windows.h>
#include <winuser.h>
using namespace std;
int main(int argc, char *argv[])
{
POINT* p = new POINT;
p->x=0;
p->y=0;
HMONITOR* monitor = MonitorFromPoint(p,DWORD.MONITOR_DEFAULTTOPRIMARY);
system("PAUSE");
return EXIT_SUCCESS;
}
しかし、それは継続的に私に与えます:
main.cpp `MonitorFromPoint' undeclared (first use this function)
どこで間違ったのですか?