Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

C: How to place mouse pointer?

10 vues
Passer au premier message non lu

Andreas Schnellbacher

non lue,
31 juill. 2017, 11 h 35 min 24 s2017-07-31
à
Hi.

during NEPMD development I wanted to place the mouse pointer:

For Sh+F10 (CUA definition for open popup menu), the pointer position
decides which of the three popup menus should be opened: mark exists
and pointer is within the mark, mark exists and pointer is outside
of the mark, no mark exists.

Setting the cursor to the mouse pointer would be easy. There exist map
functions. But I can't find anything about setting the mouse pointer to
the cursor position or to any other position.

It would be nice if someone could provide a code snippet or point me to
the C function I have to use.

--
Andreas Schnellbacher

Andreas Schnellbacher

non lue,
31 juill. 2017, 13 h 55 min 07 s2017-07-31
à
On 31.07.17 17:35, Andreas Schnellbacher wrote:

> during NEPMD development I wanted to place the mouse pointer:
>
> For Sh+F10 (CUA definition for open popup menu), the pointer position
> decides which of the three popup menus should be opened:

Additional info: The EPM macro functions (E language) are related to
the last mouse click, not to the actual pointer position. So maybe I
have to set the last mouse click programatically. In other words:
Setting the last mouse click to a selectable screen or application
window position would be sufficient for me.

--
Andreas Schnellbacher

Andreas Kohl

non lue,
31 juill. 2017, 13 h 57 min 25 s2017-07-31
à
Andreas Schnellbacher schrieb:
I doubt that any C library function can be utilised. For PM programs you
could call WinQueryCursorInfo an give the x/y values from CURSORINFO
later to WinSetPointerPos.

--
Andreas

Andreas Schnellbacher

non lue,
31 juill. 2017, 14 h 14 min 57 s2017-07-31
à
On 31.07.17 19:56, Andreas Kohl wrote:

> I doubt that any C library function can be utilised. For PM programs you
> could call WinQueryCursorInfo an give the x/y values from CURSORINFO
> later to WinSetPointerPos.

Yes, see also my last posting. The following functions exist:

o WinQueryWindowPos
o WinMapWindowPoints
o WinSetPointerPos
o WinPopupMenu

If I would use WinPopupMenu in EPM (C functions can be used in the macro
language), then I wouldn't have that problem: Then I could specify the x
and y position.

But I would like to use the internal EPM function, which lacks these
parameters. It simply takes the position of the last mouse click. (The
advantage of the internal EPM function is that is has a scriptable
interface for the E macro language.)

--
Andreas Schnellbacher

Andreas Schnellbacher

non lue,
31 juill. 2017, 14 h 28 min 21 s2017-07-31
à
On 31.07.17 19:55, Andreas Schnellbacher wrote:

> Additional info: The EPM macro functions (E language) are related to
> the last mouse click, not to the actual pointer position.

A workaround could be to move the popup window to a specified position
after opening it. But maybe issuing a mouse click per code would be
better.

--
Andreas Schnellbacher
0 nouveau message