You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been beating my head against a wall with the io.WantMouseCapture.
There must be something simple im doing wrong.
Im working with version v1.76, its a old project.
I read the faq about io.WantCaptureMouse and tried it in multiple ways.
But im a beginner so maybe there is something wrong im doing.
This is my imgui code:
This doesnt work. Although it does block the clicks, when its hovering on my test window, and it works when clicking on the menu of the application, it ALSO blocks clicks on all other windows that i created (so those other windows dont work now).
If i remove this code and instead use this then it works:
Make a global bool g_eatMouse :).
This works perfectly. All windows work, and the clicks are blocked to the application when clicking on a window.
However i know this is not the offical way to do things. So i would prefer to do it like you do officially.
But it does seem more simple to me, because its using only 1 bool :).
Help please
The text was updated successfully, but these errors were encountered:
if (io.WantCaptureMouse)
return 0;
return CallWindowProc(g_DrawingApp.WndProc, hWnd, uMsg, wParam, lParam);
This will prevent CallWindowProc() from being called at all. Since this is a low-level function used by many things you should probably always forward all events.
You should read io.WantCaptureMouse at the location where mouse inputs are forwarded or handled by the underlying application and not forward or not handle them when the value is true. We are lacking enough context.
I have been beating my head against a wall with the io.WantMouseCapture.
There must be something simple im doing wrong.
Im working with version v1.76, its a old project.
I read the faq about io.WantCaptureMouse and tried it in multiple ways.
But im a beginner so maybe there is something wrong im doing.
This is my imgui code:
This is my hookedproc:
This doesnt work. Although it does block the clicks, when its hovering on my test window, and it works when clicking on the menu of the application, it ALSO blocks clicks on all other windows that i created (so those other windows dont work now).
If i remove this code and instead use this then it works:
Make a global bool g_eatMouse :).
This works perfectly. All windows work, and the clicks are blocked to the application when clicking on a window.
However i know this is not the offical way to do things. So i would prefer to do it like you do officially.
But it does seem more simple to me, because its using only 1 bool :).
Help please
The text was updated successfully, but these errors were encountered: