How can I get events that tell when the mouse enter or leave a
window surface (Carbon) ?
I tried to attach a handle on the window root control..
Actually, you installed it on the root view, which is not the root
control. The root control is old name for the content view. You might
try installing the handler on the content view and see if you have
better luck.
lEventClass= GetEventClass(inEvent);
lEventKind = GetEventKind(inEvent);
window= (WindowRef)userData;
switch (lEventClass)
{
case kEventClassControl:
{
HIViewTrackingAreaRef TrackRef;
HIViewTrackingAreaID TrackID;
GetEventParameter(inEvent, kEventParamHIViewTrackingArea,
typeHIViewTrackingAreaRef, NULL, sizeof(TrackRef), NULL, &TrackRef);
HIViewGetTrackingAreaID(TrackRef, &TrackID);
iTrack= TrackID;
switch (lEventKind)
{
case kEventControlTrackingAreaEntered:
{
printf("AreaEntered ID %d\n", iTrack);fflush(stdout);
}break;
case kEventControlTrackingAreaExited:
{
printf("AreaExited ID %d\n", iTrack);fflush(stdout);
}break;
}
}
}
return result;
}
_______________________________________________
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
_______________________________________________
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