- Rect bounds ;
- Str255 title ;
-
- MacPreControlCreate( parent , id , "" , pos , size ,style,*( (wxValidator*) NULL ) , name , &bounds , title ) ;
-
- m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 100,
- kControlLittleArrowsProc , (long) this ) ;
-
- wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ;
-
- MacPostControlCreate() ;
-
- return TRUE;
+ if (!parent)
+ return FALSE;
+
+ Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
+
+ verify_noerr ( CreateLittleArrowsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , 0 , m_min , m_max , 1 ,
+ (ControlRef*) &m_macControl ) ) ;
+
+ MacPostControlCreate(pos,size) ;
+
+ return TRUE;