I am trying to write a c++ program so i can get a gaze tracker to work like a mouse moving the cursor. However, when I used the function WM_INPUT it says i need ";" and to declare a type. i understand why i need to but i dont get why MS gave me something that doesnt work.
Hi thanks. i understand better now. but i have encountered a problem with compiling saying this:
error C2664: 'RegisterRawInputDevices' : cannot convert parameter 1 from 'RAWINPUTDEVICE' to 'PCRAWINPUTDEVICE'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
RegisterRawInputDevices takes a pointer to RAWINPUTDEVICE so add an & before GazeTracker in that line: RegisterRawInputDevices (&GazeTracker, 1, sizeof (GazeTracker));
The question is the "1" that's in the new code should be a PUINT and should be a pointer to the earlier UINT "1" in RegisterRawInputDevice. Am i correct?
If so how do i alter the code so that it does not hav a compile error.
The question is the "1" that's in the new code should be a PUINT and should be a pointer to the earlier UINT "1" in RegisterRawInputDevice. Am i correct?
Yes, I missed it ( MS names suck ) you need to declare an UINT:
1 2
UINT num = 1;
/*call function ... */ , &num, // ...
if ( ... = -1) in C++ = is for assignment, so replace it with == which is for comparison
I think you set pRawInputDeviceList to null.
You the call GetRawInputDeviceList, this will fail but tell you how many devices there are via uiNumDevices. Assign enough space to pRawInputDeviceList and call GetRawInputDeviceList again, this time you should have all the devices.