| version 1.2, 2004/03/02 23:23:06 | version 1.3, 2004/03/15 05:06:02 | 
| Line 13 | Line 13 | 
 | #include "dialog.h" | #include "dialog.h" | 
 | #include "dialogutils.h" | #include "dialogutils.h" | 
 | #include "midiopt.h" | #include "midiopt.h" | 
 |  | #include "dipswbmp.h" | 
 |  |  | 
 | #define setControlValue(a,b,c)          SetControl32BitValue(getControlRefByID(a,b,midiWin),c) | #define setControlValue(a,b,c)          SetControl32BitValue(getControlRefByID(a,b,midiWin),c) | 
 | #define getMenuValue                            (GetControl32BitValue(getControlRefByID(cmd.commandID,0,midiWin))-1) | #define getMenuValue                            (GetControl32BitValue(getControlRefByID(cmd.commandID,0,midiWin))-1) | 
| Line 70  static void setMPUs(void) { | Line 71  static void setMPUs(void) { | 
 |  |  | 
 | setControlValue('usem', 0, mpucfg.def_en); | setControlValue('usem', 0, mpucfg.def_en); | 
 | setMIMPIFilename(); | setMIMPIFilename(); | 
 |  |  | 
 |  | PicHandle   pict; | 
 |  | ControlRef  disp = getControlRefByID('BMP ', 0, midiWin); | 
 |  | setbmp(dipswbmp_getmpu(mpu), &pict); | 
 |  | SetControlData(disp, kControlNoPart, kControlPictureHandleTag, sizeof(PicHandle), &pict); | 
 | } | } | 
 |  |  | 
 | static pascal OSStatus cfWinproc(EventHandlerCallRef myHandler, EventRef event, void* userData) { | static pascal OSStatus cfWinproc(EventHandlerCallRef myHandler, EventRef event, void* userData) { | 
| Line 149  static pascal OSStatus cfWinproc(EventHa | Line 155  static pascal OSStatus cfWinproc(EventHa | 
 | break; | break; | 
 | } | } | 
 | } | } | 
 |  | else if (GetEventClass(event)==kEventClassWindow && GetEventKind(event)==kEventWindowShowing ) { | 
 |  | //setMPUs(); | 
 |  | //SysBeep(0); | 
 |  | } | 
 |  |  | 
 | (void)myHandler; | (void)myHandler; | 
 | (void)userData; | (void)userData; | 
| Line 174  static void makeNibWindow (IBNibRef nibR | Line 184  static void makeNibWindow (IBNibRef nibR | 
 | if (err == noErr) { | if (err == noErr) { | 
 |  |  | 
 | initMidiWindow(); | initMidiWindow(); | 
| EventTypeSpec   list[]={ { kEventClassCommand, kEventCommandProcess },}; | EventTypeSpec   list[]={ { kEventClassCommand, kEventCommandProcess }, | 
|  | { kEventClassWindow,  kEventWindowShowing} }; | 
 | InstallWindowEventHandler (midiWin, NewEventHandlerUPP(cfWinproc), GetEventTypeCount(list), list, (void *)midiWin, &ref); | InstallWindowEventHandler (midiWin, NewEventHandlerUPP(cfWinproc), GetEventTypeCount(list), list, (void *)midiWin, &ref); | 
 | ShowSheetWindow(midiWin, hWndMain); | ShowSheetWindow(midiWin, hWndMain); | 
 |  |  |