forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

get_mouse_position

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
GEWV



Joined: 25 Nov 2013
Posts: 19

PostPosted: Tue Nov 26, 2013 9:59 am    Post subject: get_mouse_position Reply with quote

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
View user's profile Send private message
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Tue Nov 26, 2013 10:10 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Tue Nov 26, 2013 10:29 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group