Carbon: Tracking mouse in custom HIVIew

Discussion in 'Mac Programming' started by marksibly, May 1, 2009.

  1. marksibly macrumors newbie

    Joined:
    May 1, 2009
    #1
    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
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000

Share This Page