- m_buttonBitmap = bitmap;
- PicHandle icon = NULL ;
- if ( m_buttonBitmap.Ok() )
- {
- wxBitmapRefData * bmap = (wxBitmapRefData*) ( m_buttonBitmap.GetRefData()) ;
- if ( bmap->m_bitmapType == kMacBitmapTypePict )
- icon = bmap->m_hPict ;
- else if ( bmap->m_bitmapType == kMacBitmapTypeGrafWorld )
- {
- icon = MakePict( bmap->m_hBitmap ) ;
- }
- }
- ControlButtonContentInfo info ;
-
- info.contentType = kControlContentPictHandle ;
- info.u.picture = icon ;
-
- UMASetControlData( m_macControl , kControlButtonPart , kControlBevelButtonContentTag , sizeof(info) , (char*) &info ) ;
+ m_bmpNormal = bitmap;
+
+ ControlButtonContentInfo info ;
+ wxMacCreateBitmapButton( &info , m_bmpNormal ) ;
+ if ( info.contentType != kControlNoContent )
+ {
+ ::SetControlData( (ControlHandle) m_macControl , kControlButtonPart , kControlBevelButtonContentTag , sizeof(info) , (char*) &info ) ;
+ }