http://www.purebasic.fr/english/viewtop ... et#p349606
However, I am finding that some of the users of my software, the code fails when they are mousing over gadgets and whatnot on OTHER MONITORS/Desktops. I.e. the main monitor, the program works without fail. Drag the window to a second monitor, in some cases the 'events' are never captured.
I think I have managed to isolate that maybe the problem is the code here:
Code: Select all
Window = WindowFromPoint_(MouseEvent_MouseY<<32|MouseEvent_MouseX)
and that the proper 'window' is never being gathered due to it being in another monitor?
Is there a fix for this, or does someone know this windows API call function (or a different call to make sure that this Window is obtained)? Maybe there is a better api call to gather the WINDOW handle that the mouse is over, even on multiple monitors?
This code/handle gathering API call is probably to help with gadgets that open up from the same app in multiple windows from the same app. The coder of this nice code project probably didn't anticipate multiple monitors/desktops, etc.
Any help is appreciated!
Always an amazing product with Purebasic and the forums here are second to none.
*EDIT The solution was to fix the math, which was not working when the user dragged app window to monitor on left, which was negative values. Here is the proper code to fix it
Code: Select all
Window = WindowFromPoint_(DesktopMouseY()<<32 + DesktopMouseX())
best,
Mike