[FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]Hi. Iave thefolowing ode segment:
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
#include "stdafx.h"
#include<iostream>
#include<conio.h>
#include<Windows.h>
using namespace std;
#define WM_MOUSEMOVE 0x0200
void main(){
typedef struct tagPOINT {
LONG x;
LONG y;
} POINT, *PPOINT;
case WM_MOUSEMOVE:
POINT pos;
GetCursorPos(&pos);
// here is your coordinates
wcout<<"x: "<<pos.x<<"
";
wcout<<"y: "<<pos.y<<"
";
The problem is, it give me an error essage at the line with “GetCursorPos(&pos);”, sayin “[FONT=Consolas][SIZE=1][FONT=Consolas][SIZE=1][SIZE=3]error C2664: ‘GetCursorPos’ : cannot convert parameter 1 from ‘POINT *’ to ‘LPPOINT’[/SIZE]
[SIZE=3]Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast”[/SIZE]
[SIZE=3]Does anyone kno what the prolem might be? Thanks. Bye.[/SIZE]
[/SIZE][/FONT][/SIZE][/FONT]