View previous topic :: View next topic |
Author |
Message |
GEWV
Joined: 25 Nov 2013 Posts: 19
|
Posted: Tue Nov 26, 2013 9:59 am Post subject: get_mouse_position |
|
|
We work with an old existing application.
In it, we use 'get_mouse_position@'.
This function no longer exists.
The alternative for this are 'get_mouse_inf@' or 'clearwin_info@'.
But both alternatives only provide values when the mouse is pressed.
But I need the values of the mouse pointer permanently. |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
Posted: Tue Nov 26, 2013 10:10 am Post subject: |
|
|
You can get the values you need for instance like here:
Code: | MOUSE_X = CLEARWIN_INFO@('GRAPHICS_MOUSE_X')+1
MOUSE_Y = CLEARWIN_INFO@('GRAPHICS_MOUSE_Y')+1
BUTTON = AND(CLEARWIN_INFO@('GRAPHICS_MOUSE_FLAGS'),31)
M_INFO = adjustl(clearwin_string@('call_back_reason'))
!
! then for instance:
!
if (M_INFO(1:16) .eq. 'MOUSE_LEFT_CLICK') ... |
To get the values all time, you can either put the code above into a loop (old style) or you can call it as part of a function from the %gr command.
Regards - Wilfried |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Tue Nov 26, 2013 10:29 am Post subject: |
|
|
get_mouse_position@ is still available in salflibc.dll.
It does not require a binding for FTN95 so you should be able to call it directly in your code.
It is not currently available in clearwin64.dll but it looks like it could be made available. |
|
Back to top |
|
|
|