MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / SetCursorPos

Method SetCursorPos

SampleFramework12/v1.00/Input.cpp:74–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void MouseState::SetCursorPos(int x, int y, HWND hwnd)
75{
76 POINT pos;
77 pos.x = x;
78 pos.y = y;
79
80 if(hwnd != NULL)
81 if(!ClientToScreen(hwnd, &pos))
82 throw Win32Exception(GetLastError());
83
84 if(!::SetCursorPos(pos.x, pos.y))
85 throw Win32Exception(GetLastError());
86}
87
88KeyState KeyboardState::GetKeyState(Keys key) const
89{

Callers

nothing calls this directly

Calls 1

Win32ExceptionClass · 0.85

Tested by

no test coverage detected