speedy_rudolf
06-22-2010, 08:24 AM
Hi. Iave thefolowing ode segment:
#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<<"\n";
wcout<<"y: "<<pos.y<<"\n";
The problem is, it give me an error essage at the line with "GetCursorPos(&pos);", sayin "error C2664: 'GetCursorPos' : cannot convert parameter 1 from 'POINT *' to 'LPPOINT'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast"
Does anyone kno what the prolem might be? Thanks. Bye.
#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<<"\n";
wcout<<"y: "<<pos.y<<"\n";
The problem is, it give me an error essage at the line with "GetCursorPos(&pos);", sayin "error C2664: 'GetCursorPos' : cannot convert parameter 1 from 'POINT *' to 'LPPOINT'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast"
Does anyone kno what the prolem might be? Thanks. Bye.