- 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 )
- {
- if ( m_buttonBitmap.GetMask() )
- {
- icon = MakePict( bmap->m_hBitmap , m_buttonBitmap.GetMask()->GetMaskBitmap() ) ;
- }
- else
- {
- icon = MakePict( bmap->m_hBitmap , NULL ) ;
- }
- }
- }