- m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , true , 0 , -12345 , 0,
- kControlPopupButtonProc , (long) this ) ;
-
- m_macPopUpMenuHandle = NewMenu( 1 , "\pPopUp Menu" ) ;
- SetControlData( m_macControl , kControlNoPart , kControlPopupButtonMenuHandleTag , sizeof( MenuHandle ) , (char*) &m_macPopUpMenuHandle) ;
- for ( int i = 0 ; i < n ; i++ )
- {
- appendmenu( m_macPopUpMenuHandle , choices[i] ) ;
- }
- SetControlMinimum( m_macControl , 0 ) ;
- SetControlMaximum( m_macControl , m_noStrings) ;
- SetControlValue( m_macControl , 1 ) ;
+ m_macPopUpMenuHandle = NewUniqueMenu() ;
+ SetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlPopupButtonMenuHandleTag , sizeof( MenuHandle ) , (char*) &m_macPopUpMenuHandle) ;
+ SetControlMinimum( (ControlHandle) m_macControl , 0 ) ;
+ SetControlMaximum( (ControlHandle) m_macControl , 0) ;
+ if ( n > 0 )
+ SetControlValue( (ControlHandle) m_macControl , 1 ) ;