0

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!

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by vmanes
0

Yes, it is VC++ express version. Then what header file I need to add under this version for solving this problem?

Thanks!

0

I think you'll have to move up to a full version of Visual Studio (Standard or higher).

If you're a university student, see if your school participates in the Microsoft Developer Network Academic Alliance (MSDNAA).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.