Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2000-10

question - mouse under Win32

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Hankovec

Hello all,
please, does exist any mouse driver under win32 working in such a way as MsMouse ? I haven't found it in standard distribution (I think, there is only MsMouse for Go32v2 there).

Thanks

Martin

Florian Klaempfl
to Martin Hankovec
Martin Hankovec wrote 6 lines
Hello all, please, does exist any mouse driver under win32 working in such a way as MsMouse ? I haven't found it in standard distribution (I think, there is only MsMouse for Go32v2 there).

It depends, what kind of application do you create?
- GUI
- Console
- GUI using the graph unit
- DirectDraw
- ...

Jeff Wormsley
to Martin Hankovec: please, does exist any mouse driver under win32 working in such a way as MsMouse ? I…
PM Martin Hankovec wrote
Hello all, please, does exist any mouse driver under win32 working in such a way as MsMouse ? I haven't found it in standard distribution (I think, there is only MsMouse for Go32v2 there).

Martin,
If you are still doing console mode stuff, you need to look at these functions...

GetNumberOfConsoleInputEvents
PeekConsoleInput
ReadConsoleInput

The ReadConsoleInput function uses an INPUT_RECORD structure that for mouse events contains a MOUSE_EVENT_RECORD that will give you the mouse position and the button information. I've not used the mouse data before, but these are the same calls used for keyboard data. You may want to look for these in the win32 RTL code and see if any mouse events are already handled, and save yourself some effort. It may be up to you to provide your own mouse cursor.

Anyone else have more info about this?

Jeff.

Martin Hankovec

Hello,
thanks for advice. I want to make console application, but I forgot to tell it 8-))

I'll try to look into Win32 RTL source.

Thanks a lot for Your patience ;-)))

Let Sun shines on every Your step.

Martin

Marco van de Voort
to Martin Hankovec
Show quoted text 6 lines
Hello, thanks for advice. I want to make console application, but I forgot to tell it 8-)) I'll try to look into Win32 RTL source.

I use the API mouse unit for the demo games.

See SameGame/GameUnit demoes.

Martin Hankovec

Hello,

>> wrote 3.10.00 8:42 >>> I use the API mouse unit for the demo games. See SameGame/GameUnit demoes.

Yes, it works. But it waits for any mouse move before it continues; I think, that

   GetMouseEvent(MouseEvent);

waits for a mouse event. Can I test, if any event occured and then run this command ? I need to run some actions in a loop (writing on screen, read keyboard etc.) and test mouse in the loop (using other words - I need compatibility with Msmouse, which doesn't wait for mouse events, simply returns the actual state of mouse and actual position).

Thank for Your patience

Martin