Getting mouse cursor position
Getting mouse cursor position
- Subject: Getting mouse cursor position
- From: eveningnick eveningnick <email@hidden>
- Date: Sat, 07 May 2011 01:55:44 +0300
Hello
I am searching for the way to find a cursor's position on the screen.
I tried to use method -hotSpot of NSCursor, but it returns
> sc x=-2057825613, y=0
-(IBAction)timeHandler:(id)timer {
//NSCursor *sc = [NSCursor currentSystemCursor];
NSCursor *sc = [NSCursor currentCursor];
NSLog(@"sc x=%d, y=%d", [sc hotSpot].x, [sc hotSpot].y);
}
What may be wrong here?
I can successfully retrieve cursor's image though. But not the position. Why?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden