MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / GetMouseSourceFromMessageExtraInfo

Function GetMouseSourceFromMessageExtraInfo

KBotExt/imgui/imgui_impl_win32.cpp:529–537  ·  view source on GitHub ↗

See https://learn.microsoft.com/en-us/windows/win32/tablet/system-events-and-mouse-messages Prefer to call this at the top of the message handler to avoid the possibility of other Win32 calls interfering with this.

Source from the content-addressed store, hash-verified

527// See https://learn.microsoft.com/en-us/windows/win32/tablet/system-events-and-mouse-messages
528// Prefer to call this at the top of the message handler to avoid the possibility of other Win32 calls interfering with this.
529static ImGuiMouseSource GetMouseSourceFromMessageExtraInfo()
530{
531 LPARAM extra_info = ::GetMessageExtraInfo();
532 if ((extra_info & 0xFFFFFF80) == 0xFF515700)
533 return ImGuiMouseSource_Pen;
534 if ((extra_info & 0xFFFFFF80) == 0xFF515780)
535 return ImGuiMouseSource_TouchScreen;
536 return ImGuiMouseSource_Mouse;
537}
538
539IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
540{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected