{I+=codeWee;}
[C++] DirectInput : Get Absolute Mouse Position

// The following result has error value.

	HRESULT result = m_mouse->GetDeviceState(sizeof(DIMOUSESTATE), (LPVOID)&m_mouseState);
	m_mouseX += m_mouseState.lX;
	m_mouseY += m_mouseState.lY;


// So use this:

	POINT point;
	GetCursorPos(&point);
	ScreenToClient(hwnd, &point);
	m_mouseX = point.x;
	m_mouseX = point.y;
HTML | PHP | C++ | DirectX11 | Javascript | C# | HTML5 | ASP | SQL | General | CSS | Oculus Rift | Unity3d | Virtools SDK | Tip | NSIS | PowerShell | node.js | Web API | RTSP | All
Copyright© 2016 CodeWee.com All rights reserved.