mousex(), mousey()

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

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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 ;-)