-void UMAHiliteControl (ControlHandle theControl,
- ControlPartCode hiliteState)
- {
- RgnHandle updateRgn = NewRgn() ;
- GetWindowUpdateRgn( GetControlOwner(theControl) , updateRgn ) ;
- if ( UMAHasAppearance() )
- {
- ::HiliteControl( theControl , hiliteState ) ;
- }
- else
- {
- ::HiliteControl( theControl , hiliteState ) ;
- }
- InvalRgn( updateRgn ) ;
+void UMAHiliteControl (ControlHandle inControl,
+ ControlPartCode hiliteState)
+{
+ WindowRef theWindow = GetControlOwner(inControl) ;
+ RgnHandle updateRgn = NewRgn() ;
+#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
+ GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
+#else
+ GetWindowUpdateRgn( theWindow , updateRgn ) ;
+#endif
+ if ( UMAHasAppearance() )
+ {
+ ::HiliteControl( inControl , hiliteState ) ;
+ }
+ else
+ {
+ ::HiliteControl( inControl , hiliteState ) ;
+ }
+#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
+ InvalWindowRgn( theWindow, updateRgn) ;
+#else
+ InvalRgn( updateRgn ) ;
+#endif