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.
| 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. |
| 529 | static 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 | |
| 539 | IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) |
| 540 | { |
no outgoing calls
no test coverage detected