Hey all,

Let me introduce myself. I'm Pepijn and I've programmed a few years in PHP. I'm trying to learn c++ now, but it's not very easy.

I wrote the following script so far, it has to display the cursors position in a dos window;
Code:
#include <iostream>
#include <windows.h>

using namespace std;

int main()
{    
     LPPOINT lpPoint;
     int x;
     int y; 
     if(!GetCursorPos(lpPoint))
     {
                               cout << "An error occurred: " << endl;
                               cout << GetLastError();
     }
     else
     {                              
        x = lpPoint->x;
        y = lpPoint->y;
        cout << x << endl;
        cout << y << endl;
     }
    cin.get();
    return 0;
}
The problem is that GetCursorPos returns 0, but GetLastError returns 0 either.
I hope you can help.

Best regards,
Pepijn