mouse movement

i would like to read the movements of the mouse so then i can read out a proper response such as if i move the mouse to the right it prints mouse moved to the right and same for left. where i need help is where i put "help here"

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#include <iostream>
#include <Windows.h>

#define WINDOW_POS_X 0
#define WINDOW_PoS_Y 0

using namespace std;

int main()
{
	cout << "Running Keyboard Drive Train Prototype" << endl;
	while (true)
	{
		Sleep(10);
		//full speed forward
		if (GetAsyncKeyState(0x57) && !(GetAsyncKeyState(VK_SHIFT)))
		{
			cout << "Robot moving forward at full speed" << endl;
		}
		//full speed back
		if (GetAsyncKeyState(0x53) && !(GetAsyncKeyState(VK_SHIFT)))
		{
			cout << "Robot moving back at full speed" << endl;
		}
		//full speed straf right	
		if (GetAsyncKeyState(0x44) && !(GetAsyncKeyState(VK_SHIFT)))
		{
			cout << "Robot strafing right at full speed" << endl;
		}
		//full speed straf left
		if (GetAsyncKeyState(0x41) && !(GetAsyncKeyState(VK_SHIFT)))
		{
			cout << "Robot strafing left at full speed" << endl;
		}
		//full speed rotate right										help here
		if (WM_NCMOUSEMOVE(left) && !(GetAsyncKeyState(VK_SHIFT)))		
		{																
			cout << "Robot rotationg right" << endl;
		}
		//full speed rotate left										help here
		if (WM_NCMOUSEMOVE(left) && !(GetAsyncKeyState(VK_SHIFT)))
		{
			cout << "Robot rotationg right" << endl;
		}
		//half speed forward
		if (GetAsyncKeyState(0x57) && (GetAsyncKeyState(VK_SHIFT)))
		{
			cout << "Robot moving forward at half speed" << endl;
		}
		//half speed back
		if (GetAsyncKeyState(0x53) && (GetAsyncKeyState(VK_SHIFT)))
		{
			cout << "Robot moving back at half speed" << endl;
		}
		//half speed straf right		
		if (GetAsyncKeyState(0x44) && (GetAsyncKeyState(VK_SHIFT)))
		{
			cout << "Robot strafing right at half speed" << endl;
		}
		//half speed straf left
		if (GetAsyncKeyState(0x41) && (GetAsyncKeyState(VK_SHIFT)))
		{
			cout << "Robot strafing left at half speed" << endl;
		}
		//half speed rotate right										help here
		if (WM_NCMOUSEMOVE(right) && (GetAsyncKeyState(VK_SHIFT)))
		{
			cout << "Robot rotationg right" << endl;
		}
		//half speed rotate left										help here
		if (WM_NCMOUSEMOVE(left) && (GetAsyncKeyState(VK_SHIFT)))
		{
			cout << "Robot rotationg right" << endl;
		}
	}
}
//w = forward full speed
//s = back full speed
//d = straf right full speed
//a = straf left full speed
//mouse right = rotate right full speed
//mouse left = rotate left full speed
//w + shif = forward half speed
//s + shif = back half speed
//d + shif = straf right half speed
//a + shif = straf left half speed
//mouse right + shif = rotate right half speed
//mouse left + shift = rotate left half speed 
Topic archived. No new replies allowed.