MCPcopy Create free account
hub / github.com/OpenKneeboard/OpenKneeboard / ProcessMessage

Function ProcessMessage

src/injectables/WindowCaptureHook.cpp:196–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196static bool
197ProcessMessage(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
198 if (ProcessControlMessage(hwnd, message, wParam, lParam)) {
199 return true;
200 }
201
202 if (!gInjecting) {
203 return false;
204 }
205
206 switch (message) {
207 case WM_MOUSEMOVE: {
208 const POINT clientPoint {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
209 POINT screenPoint {clientPoint};
210 ClientToScreen(hwnd, &screenPoint);
211 gInjectedPoint = InjectedPoint {
212 .mHwnd = hwnd,
213 .mScreenPoint = screenPoint,
214 };
215 }
216 return false;
217 case WM_MOUSELEAVE:
218 case WM_NCMOUSELEAVE:
219 return true;
220 default:
221 return false;
222 }
223}
224
225extern "C" __declspec(dllexport) LRESULT CALLBACK
226GetMsgProc_WindowCaptureHook(int code, WPARAM wParam, LPARAM lParam) {

Callers 2

Calls 1

ProcessControlMessageFunction · 0.85

Tested by

no test coverage detected