X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a67a93b17c37c018f60e662645ee2a44ba4e58e..a9249b2eb2a40d8c71f828669045c4ddaa8dc5ff:/src/mac/combobox.cpp diff --git a/src/mac/combobox.cpp b/src/mac/combobox.cpp index d765346c5c..712a6dddbf 100644 --- a/src/mac/combobox.cpp +++ b/src/mac/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 , true , 0 , -12345 , 0, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &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++ ) {