X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fdaf613add176525ed8b6cafaf278dfd80f85074..33754c4d83c59b7523a6da0c4fb21079cb60301c:/src/mac/carbon/combobox.cpp diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 36e92ad7a3..5dabd2dd49 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -23,6 +23,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) // right now we don't support editable comboboxes +static int nextPopUpMenuId = 1000 ; +MenuHandle NewUniqueMenu() +{ + MenuHandle handle = NewMenu( nextPopUpMenuId , "\pMenu" ) ; + nextPopUpMenuId++ ; + return handle ; +} bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value, @@ -40,10 +47,10 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0, + m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0, kControlPopupButtonProc , (long) this ) ; - m_macPopUpMenuHandle = NewMenu( 1 , "\pPopUp Menu" ) ; + m_macPopUpMenuHandle = NewUniqueMenu() ; SetControlData( m_macControl , kControlNoPart , kControlPopupButtonMenuHandleTag , sizeof( MenuHandle ) , (char*) &m_macPopUpMenuHandle) ; for ( int i = 0 ; i < n ; i++ ) {