MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / make_mouse_lparam

Method make_mouse_lparam

source/MaaWin32ControlUnit/Input/MessageInput.cpp:133–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133LPARAM MessageInput::make_mouse_lparam(HWND target, int x, int y)
134{
135 if (target == hwnd_) {
136 return MAKELPARAM(x, y);
137 }
138 POINT pt = { x, y };
139 if (!ClientToScreen(hwnd_, &pt)) {
140 LogError << "ClientToScreen failed in make_mouse_lparam" << VAR(hwnd_) << VAR(GetLastError());
141 return MAKELPARAM(x, y);
142 }
143 if (!ScreenToClient(target, &pt)) {
144 LogError << "ScreenToClient failed in make_mouse_lparam" << VAR(target) << VAR(GetLastError());
145 return MAKELPARAM(x, y);
146 }
147 return MAKELPARAM(pt.x, pt.y);
148}
149
150POINT MessageInput::client_to_screen(int x, int y)
151{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected