X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b26b60fac70f89cf33935f78469e27536d8b614..7db33cc31068fcbc0444a3b93829833662fb977a:/src/mac/scrolbar.cpp?ds=sidebyside diff --git a/src/mac/scrolbar.cpp b/src/mac/scrolbar.cpp index eef2a84c54..680bc2f33d 100644 --- a/src/mac/scrolbar.cpp +++ b/src/mac/scrolbar.cpp @@ -40,24 +40,25 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { - if (!parent) - return FALSE; - + if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) + return FALSE; + Rect bounds ; Str255 title ; - + MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , true , 0 , 0 , 100, - kControlScrollBarLiveProc , (long) this ) ; - + m_macControl = ::NewControl(MAC_WXHWND(parent->MacGetRootWindow()) , + &bounds , title , false , 0 , 0 , 100, + kControlScrollBarLiveProc , (long) this) ; + wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ; ::SetControlAction( (ControlHandle) m_macControl , wxMacLiveScrollbarActionUPP ) ; MacPostControlCreate() ; - return TRUE; + return TRUE; } wxScrollBar::~wxScrollBar()