- Rect bounds ;
- Str255 title ;
-
- MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ;
-
- m_macPopUpMenuHandle = NewMenu( 1 , "\pPopUp Menu" ) ;
- m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , true , 0 , -12345 , 0 ,
- kControlPopupButtonProc + kControlPopupFixedWidthVariant , (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++ )
- {
- Str255 label;
- wxMenuItem::MacBuildMenuString( label , NULL , NULL , choices[i] ,false);
- AppendMenu( m_macPopUpMenuHandle , label ) ;
- m_strings.Add( choices[i] ) ;
- }
- SetControlMinimum( m_macControl , 0 ) ;
- SetControlMaximum( m_macControl , Number()) ;
- if ( n > 0 )
- SetControlValue( m_macControl , 1 ) ;