Does anybody know a way to read the mouse at pixel resolution while using the graph unit?
Mark

Mailing lists / fpc-pascal / 2003-02
5 messages · 4 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Does anybody know a way to read the mouse at pixel resolution while using the graph unit?
Mark
Mark Emerson wroteDoes anybody know a way to read the mouse at pixel resolution while using the graph unit?
You mean for go32v2? It depends on your mouse driver I think.
Please excuse my ignornace, but I don't yet understand what "go32v2" means...I see this term used in the FPC documentation in connection with platforms, but I've never heard of it. Is it a processor? Or an OS? Or what?
I am running entirely in graphics mode and am using the graph unit to accomplish this. I am creating state-of-the-art graphics that can be manipulated by the user via the mouse. I simply need to be able to read mouse events (and also to change the mouse cursor). The application I'm creating must run on Win32, Linux and Unix (and Mac when FPC is ready)...with separate compilations for each platform as needed.
The units in the RTL are system independent, which I greatly appreciate. I also greatly appreciate the graph unit's capability to select the highest resolution possible for any machine. However, the mouse unit offers only "character" granularity resolution which won't work in a hi-res graphics environment...I need the mouse resolution to be at the pixel level, as it is in any modern GUI.
How can I achieve this?
Mark
go32v2 is a so-called dos extender: It allows 32-bit programs to run on plain DOS. It was written by D.J. Delorie (http://www.delorie.com)
Since FPC is a 32 bit compiler, it relies on the services of such an extender. Another such extender is EMX, or WDOSX.
The best way to go about this is not to use the graph unit. The graph unit is provided for TP compatibility, but modern-day GUI systems do not work with the same paradigm. I suggest you look into using GTK or so. It's relatively cross-platform as well, and is quite well supported by FPC.
Michael.
Please excuse my ignornace, but I don't yet understand what "go32v2" means...I see this…
highest resolution possible for any machine. However, the mouse unit offers only "character" granularity resolution which won't work in a hi-res graphics environment...I need the mouse resolution to be at the pixel level, as it is in any modern GUI.
Did you init the mouse driver before or after switching to graphics mode? I noticed that some mouse drivers deliver different resolution depending on the active screen mode at the moment of their initialization.
hope this helps,
Klaus