- verify_noerr(CreateBevelButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds,CFSTR(""),
- kControlBevelButtonLargeBevel , kControlBehaviorPushbutton , &info , 0 , 0 , 0 , (ControlRef*) &m_macControl ) ) ;
+ err = CreateBevelButtonControl(
+ MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds, CFSTR(""),
+ kControlBevelButtonLargeBevel, kControlBehaviorPushbutton,
+ &info, 0, 0, 0, m_peer->GetControlRefAddr() );
+ }
+
+ verify_noerr( err );
+ wxASSERT_MSG( m_peer != NULL && m_peer->Ok() , wxT("No valid Mac control") ) ;
+
+ MacPostControlCreate( pos, size );
+
+ return true;
+}
+
+wxWindow *wxButton::SetDefault()
+{
+ wxWindow *btnOldDefault = wxButtonBase::SetDefault();
+
+ if ( btnOldDefault )
+ {
+ // cast needed to access the protected member
+ btnOldDefault->GetPeer()->SetData(kControlButtonPart , kControlPushButtonDefaultTag , (Boolean) 0 ) ;