- m_peer = new wxMacControl() ;
- verify_noerr ( CreateScrollBarControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
- 0 , 0 , 100 , 1 , true /* liveTracking */ , wxMacLiveScrollbarActionUPP , m_peer->GetControlRefAddr() ) );
-
+ m_peer = new wxMacControl( this );
+ OSStatus err = CreateScrollBarControl(
+ MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds,
+ 0, 0, 100, 1, true /* liveTracking */,
+ GetwxMacLiveScrollbarActionProc(),
+ m_peer->GetControlRefAddr() );
+ verify_noerr( err );