mousex(), mousey()

BlitzMax Forums/BlitzMax Programming/mousex(), mousey()

Type TPoint
	Field X
	Field Y
End Type

Function ccGetCursorPos:TPoint()
	'Returns a TPoint
	?Win32 
	Local point:TPoint = New TPoint
	If Not GetCursorPos(point) Then
    	ccRunTimeError ("Error Getting Cursor Pos")	
		Return Null
	Else
		Return point
	EndIf
	?
End Function


This get's it relative to the desktop top left, not sure if it helps. BUT you can work out your window (or client area) top left and calc the X Y in the app. All part of my Game Framework ;-)