Made Cursor location detection automatic

Added case WM_MOUSEMOVE for cursor location detection.