DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   a question about atltypes.h (http://www.daniweb.com/forums/thread158617.html)

Quendy Nov 20th, 2008 3:11 pm
a question about atltypes.h
 
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!

vmanes Nov 20th, 2008 3:27 pm
Re: a question about atltypes.h
 
Which compiler are you using? VC++ Express versions don't have the MFC or ATL components.

Quendy Nov 20th, 2008 3:28 pm
Re: a question about atltypes.h
 
Yes, it is VC++ express version. Then what header file I need to add under this version for solving this problem?

Thanks!

vmanes Nov 20th, 2008 3:52 pm
Re: a question about atltypes.h
 
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).


All times are GMT -4. The time now is 8:00 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC