Here is my code, I want to get the coordinate of the mouse position:
#include <iostream>
#include <string>
//#include "WinDef.h"
//#include "stdafx.h"
#include <windowsx.h>
#include <windows.h>
#include <atltypes.h>
using namespace std;
int main() {
DWORD pos = GetMessagePos();
CPoint pt(LOWORD(pos), HIWORD(pos));
ScreenToClient(&pt);
return 0;
}
But I could get it compiled through, below is the error information I got:
c:\documents and settings\yayang\my documents\visual studio 2008\projects\test2\test2\yyh2.cpp(7) : fatal error C1083: Cannot open include file: 'atltypes.h': No such file or directory
Does anyone help me? I am new to C++. Thanks!