+void UMAHiliteControl (ControlHandle inControl,
+ ControlPartCode hiliteState)
+{
+ WindowRef theWindow = GetControlOwner(inControl) ;
+ RgnHandle updateRgn = NewRgn() ;
+#if TARGET_CARBON
+ GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
+#else
+ GetWindowUpdateRgn( theWindow , updateRgn ) ;
+#endif
+ Point zero = { 0 , 0 } ;
+ LocalToGlobal( &zero ) ;
+ OffsetRgn( updateRgn , -zero.h , -zero.v ) ;
+ if ( UMAHasAppearance() )
+ {
+ ::HiliteControl( inControl , hiliteState ) ;
+ }
+ else
+ {
+ ::HiliteControl( inControl , hiliteState ) ;
+ }
+#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
+ InvalWindowRgn( theWindow, updateRgn) ;
+#else
+ InvalRgn( updateRgn ) ;
+#endif
+ DisposeRgn( updateRgn ) ;