09-15-2022, 04:44 PM
(09-15-2022, 03:51 PM)Spriggsy Wrote: I don't want to destroy your hopes and dreams but it might be impossible with QB64's window just for the reason that the window is already registered. However, if I can unregister the window and then re-register it..... maybe it would work? I'll try it out. It's going to be a complicated mess no matter how we go about it, unfortunately.
Ok... Well it's worth a try!
The other approach I was originally planning to try (when it was 100% C code) was to create a separate executable that read the mouse coordinates, relative to the Windows desktop and not the QB64 Window. The QB64 program would call it using your pipecom method, sending in a command line parameter to specify which mouse to return coordinates for (sending in none, it would simply return the count of raw input mouse devices detected), and it would return the x/y coordinates & mouse button status for the specified mouse, in a string formatted something like
{x},{y},{button1},{button2},{button3},{scrollwheel}
as either absolute position or dx,dy, whichever works.
So along those lines, how about getting RawInput to return the mouse position relative to the Windows desktop, rather than the QB64 program window?
Alternately, what if the mouse code creates a Window that it uses to get mouse input, but it's an invisible window (maybe just don't paint it?) maximized to take up the full desktop?
Then inside the event, it calls the regular QB64 routines that process the mouse input, read keyboard input, and update QB64's screen (which is visible since the mouse window is transparent)?
My gut tells me there has to be a way to make this work!