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: Getting a cursor's bitmap and hotspot



on Mon, 28 Feb 2005 12:20:31, Laurence Harris <email@hidden> wrote:

> On 2/28/05 12:05 PM, Ian Krieg didst favor us with:
> 
>>> On 2/28/05 11:30 AM, Mike Kluev didst favor us with:
>>> 
>>>> on 28/02/2005 7:20 Pm, Sean McBride at email@hidden wrote:
>>>> 
>>>>> On 2005-02-28 06:56, Mike Kluev said:
>>>>> 
>>>>>> I know you've already chosen to solve the problem by different means,
>>>>>> but, anyway... HideCursor, SetThemeCursor, QDGetCursorData, InitCursor
>>>>>> should do the trick without flicker.
>>>>> 
>>>>> Would the cursor not visibly disappear and reappear if I did that?
>>>> 
>>>> I think so, but if it doesn't change its shape and disappear/reappear
>>>> in how long ? one tick ? you'll hardly notice it.
>>> 
>>> If you need to set the cursor to do this, I would assume the cursor isn't or
>>> might not be the arrow cursor when you do this. If so, you'll change the
>>> cursor without changing it back, and that's more than a flicker. The upshot
>>> is that this is a hack I wouldn't use if I were you.
>> 
>> I think the poster's intention was that InitCursor would set the
>> cursor back, and show it.  I don't know whether this is actually the
>> case.  If not, another SetThemeCursor call followed by ShowCursor
>> should work.  In fact, I would think calling InitCursor anytime after
>> having made cursor calls would be an iffy way to do things; is that
>> really its intended usage?
> 
> Except that InitCursor doesn't "set it back." It sets it to the arrow
> cursor. If the cursor was the hand cursor when this process started, for
> example, it would change from the hand to an arrow when this happens, and
> that's more noticeable than a 1-tick flicker.

ok...

1) QDGetCursorData (to save the current cursor)
2) HideCursor
3) SetThemeCursor
4) QDGetCursorData again
5) Now restore cursor to (1)
6) ShowCursor
7) Now convert cursor image from (4) to NSCursor

Mike


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to 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.