• C: How to place mouse pointer?

    From Andreas Schnellbacher@21:1/5 to All on Mon Jul 31 17:35:22 2017
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Kohl@21:1/5 to Andreas Schnellbacher on Mon Jul 31 19:56:45 2017
    Andreas Schnellbacher schrieb:
    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.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Schnellbacher@21:1/5 to Andreas Kohl on Mon Jul 31 20:14:54 2017
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Schnellbacher@21:1/5 to Andreas Schnellbacher on Mon Jul 31 19:55:04 2017
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Schnellbacher@21:1/5 to Andreas Schnellbacher on Mon Jul 31 20:28:19 2017
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)