Please take a look the code below, its not the complete thing obviously since that'd be too long.
Essentially the problem is that when I click the mouse, the program doesn't seem to record the coordinates. So the if statements are never executed. The problem could also be with the if statements, I'm not sure.
One thing I noticed was that when the do while loop is running and the left mouse button is not pressed then X and Y of dwMousePosition are both 0. But then if I press the left mouse button then the coordinates become x = 1 and y = 0.
Any help is appreciated
NOTE I'm on Windows 7, 64 bit, using Visual Studio Express 2013 for Windows Desktop