Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cursors in windows



On Monday, August 18, 2003, at 03:54 PM, Bob Sabiston wrote:

Is there an easy way to have a cursor change when it is in a specific window? Up until now I have been using window regions and PtnInRgn() to determine which cursor to display. That means I have to add and subtract from the regions as various windows appear, disappear, and move around. And now I am having a strange problem where I go to move a window, and the cursor changes to the wrong thing as the window is being moved. Somewhere my window region calculation is getting screwed up.

Take a look at the kEventWindowCursorChange event in CarbonEvents.h (available in Mac OS X and CarbonLib 1.5 and later). I would say this would be the preferred method to use.

I currently handle cursor adjusting in my windows based on mouse-moved events. I didn't adopt the better method(s) since my baseline is CarbonLib 1.2. In this approach, just install a mouse-moved handler on your window. When your handler is called, you can get the mouse position and adjust the cursor as needed.

___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Founder & President
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >cursors in windows (From: Bob Sabiston <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.