- if ( GetControlRegion( m_controlRef, kControlContentMetaPart , rgn ) == noErr )
- GetRegionBounds( rgn , &content ) ;
+
+ if ( HIViewCopyShape(m_controlRef, kHIViewContentMetaPart, &rgn) == noErr)
+ {
+ CGRect cgrect;
+ HIShapeGetBounds(rgn, &cgrect);
+ content = (Rect){ (short)cgrect.origin.y,
+ (short)cgrect.origin.x,
+ (short)(cgrect.origin.y+cgrect.size.height),
+ (short)(cgrect.origin.x+cgrect.size.width) };
+ CFRelease(rgn);
+ }