> I simply want to capture the continuously updated map cursor movements > in lat/lon degrees.decimal, convert them to degrees:minutes.decimal > minutes and display them on the status bar. Is there a map basic > function that will allow this?
You can do this in MapBasic, but not "simply." The trick involves the use of Windows APIs. Years ago Robert Edwards showed us here on MapInfo-L how to do this with his XMouse tool (search the MapInfo-L archives for "XMouse".) The relevant APIs are: Declare Function ClientToScreen Lib "user32" ( ByVal hwnd As Integer, lpPoint As LPPOINT) As Integer Declare Function GetAsyncKeyState Lib "USER32" ( ByVal one As Integer) As Integer Declare Function GetClientRect Lib "User32" ( ByVal hwnd As Integer, RectArg As LPRECT) As Integer Declare Function GetCursorPos Lib "USER32" ( CursorLoc As LPPOINT) As Integer Declare Function GetDC Lib "user32" ( ByVal hwnd As Integer) As Integer Declare Function GetSystemMetrics Lib "User32" ( ByVal MetricParm As Integer) As Integer Declare Function LineTo Lib "gdi32" ( ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer) As Integer Declare Function LoadCursorA Lib "User32" ( ByVal HandleArg As Integer, ByVal CursorName As Integer) As Integer Declare Function MoveToEx Lib "gdi32" ( ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer, lpPoint As LPPOINT) As Integer Declare Function ReleaseDC Lib "user32" ( ByVal hwnd As Integer, ByVal hdc As Integer) As Integer Declare Function ScreenToClient Lib "user32" ( ByVal hwnd As Integer, lpPoint As LPPOINT) As Integer Declare Function SetCursor Lib "User32" ( ByVal SetCursorArg As Integer) As Integer Declare Function SetROP2 Lib "gdi32" ( ByVal hdc As Integer, ByVal nDrawMode As Integer) As Integer Declare Function ShowCursor Lib "User32" ( ByVal ShowCursorArg As Integer) As Integer It's a pretty impressive use of Windows APIs in MapBasic, and it works quite well. - Bill Thoen --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 12319
