PDA

View Full Version : Carbon: Tracking mouse in custom HIVIew




marksibly
May 1, 2009, 09:43 PM
Hi,

A quick Carbon question:

How do I track the mouse in a custom HIView control?

So far, I'm handling the 'HitTest' event by setting the event part code param to '1' and returning noErr, after which I get a single 'Track' event.

However, I want to do something more like a scrollbar, that gets continuous mouse movement events and even handles the mouse moving 'outside' of the view.

Any ideas how to achieve this?

Do I have to go into a 'track the mouse' loop in the Track event or something? How do I redraw the control then? Does the event handler recurse?

Bye!
Mark



kainjow
May 2, 2009, 12:29 AM
Try here: Carbon Event Manager Tasks (https://developer.apple.com/documentation/Carbon/Conceptual/Carbon_Event_Manager/Tasks/CarbonEventsTasks.html) - scroll down to Tracking Mouse Movements.