PrefWndCreate(hStartWnd);
PrefWndCreate(hMainWnd);
void MainCmdProc(HWND hwnd, int wId, HWND hwndCtl, UINT wNotifyCode){	 // PrintfDebugWnd("WM_COMMAND: ID%lx HWND%lx CODE%lx\n",wId,hwndCtl,wNotifyCode);    switch(wId)    {      case IDM_STOP:		  w32g_send_rc(RC_STOP, 0);		  break;      case IDM_PAUSE:		  SendDlgItemMessage(hMainWnd, IDC_TOOLBARWINDOW_MAIN,									TB_CHECKBUTTON, IDM_PAUSE,									(LPARAM)MAKELONG(!play_pause_flag, 0));		  w32g_send_rc(RC_TOGGLE_PAUSE, 0);		  break;      case IDM_PREV:		  w32g_send_rc(RC_REALLY_PREVIOUS, 0);		  break;      case IDM_BACKWARD:		  /* Do nothing here. See WM_NOTIFY in MainProc() */		  break;      case IDM_PLAY:		  if(play_pause_flag)		  {				SendDlgItemMessage(hMainWnd, IDC_TOOLBARWINDOW_MAIN,										 TB_CHECKBUTTON, IDM_PAUSE,										 (LPARAM)MAKELONG(FALSE, 0));				w32g_send_rc(RC_TOGGLE_PAUSE, 0);		  }		  if(!w32g_play_active)				w32g_send_rc(RC_LOAD_FILE, 0);		  break;      case IDM_FOREWARD:		  /* Do nothing here. See WM_NOTIFY in MainProc() */		  break;      case IDM_NEXT:		  w32g_send_rc(RC_NEXT, 0);		  break;      case IDM_CONSOLE:      case IDM_MWCONSOLE:		  ToggleSubWindow(hConsoleWnd);		  break;      case IDM_TRACER:      case IDM_MWTRACER:		  ToggleSubWindow(hTracerWnd);//		  MainWndUpdateTracerButton();//		  MessageBox(hwnd, "Not Supported.","Warning!",MB_OK);		  break;      case IDM_LIST:      case IDM_MWPLAYLIST:		  ToggleSubWindow(hListWnd);		  if(IsWindowVisible(hListWnd))			w32g_send_rc(RC_EXT_UPDATE_PLAYLIST, 0);		  break;      case IDM_DOC:      case IDM_MWDOCUMENT:		  ToggleSubWindow(hDocWnd);//		  if(IsWindowVisible(hDocWnd))//			  w32g_send_rc(RC_EXT_DOC, 0);		  break;      case IDM_WRD:      case IDM_MWWRDTRACER:		  ToggleSubWindow(hWrdWnd);//		  MainWndUpdateWrdButton();//		  MessageBox(hwnd, "Not Supported.","Warning!",MB_OK);		  break;      case IDM_SOUNDSPEC:      case IDM_MWSOUNDSPEC:		  MainWndUpdateSoundSpecButton();		  MessageBox(hwnd, "Not Supported.","Warning!",MB_OK);		  break;      case IDOK:		  break;      case IDCANCEL:		  OnQuit();		  break;      case IDM_MFOPENFILE:		  DlgMidiFileOpen(hwnd);		  break;      case IDM_MFOPENDIR:		  DlgDirOpen(hwnd);		  break;      case IDM_MFLOADPLAYLIST:		  DlgPlaylistOpen(hwnd);		  break;      case IDM_MFSAVEPLAYLISTAS:		  DlgPlaylistSave(hwnd);		  break;      case IDM_MFEXIT:		  OnQuit();		  break;      case IDM_SETTING:		  PrefWndCreate(hStartWnd);		  break;      case IDM_MCSAVEINIFILE:		  VOLATILE_TOUCH(PrefWndDoing);		  if(PrefWndDoing){				MessageBox(hMainWnd, "Can't Save Ini file while preference dialog.",							  "Warning", MB_OK);				break;		  }		  SaveIniFile(sp_current, st_current);		  break;      case IDM_MCLOADINIFILE:		 if(!w32g_has_ini_file) {		     MessageBox(hMainWnd, "Can't load Ini file.",				"Warning", MB_OK);		     break;		 }		  VOLATILE_TOUCH(PrefWndDoing);		  if(PrefWndDoing){				MessageBox(hMainWnd, "Can't load Ini file while preference dialog.",							  "Warning", MB_OK);				break;		  }		  LoadIniFile(sp_temp,st_temp);		  PrefWndCreate(hStartWnd);		  break;      case IDM_MWDEBUG:#ifdef W32GUI_DEBUG		  if(IsWindowVisible(hDebugWnd))				ShowWindow(hDebugWnd,SW_HIDE);		  else				ShowWindow(hDebugWnd,SW_SHOW);#endif		  break;      case IDM_MHTOPIC:		  MessageBox(hwnd, "Not Supported.","Warning!",MB_OK);		  break;      case IDM_MHHELP:		  MessageBox(hwnd, "Not Supported.","Warning!",MB_OK);		  break;      case IDM_MHONLINEHELP:		  if (PlayerLanguage == LANGUAGE_JAPANESE) {			  ShellExecute(HWND_DESKTOP, NULL, "http://timidity-docs.sourceforge.jp/", NULL, NULL, SW_SHOWNORMAL);		  } else {			  ShellExecute(HWND_DESKTOP, NULL, "http://timidity.sourceforge.net/index.html.en", NULL, NULL, SW_SHOWNORMAL);		  }		  break;      case IDM_MHBTS:		  if (PlayerLanguage == LANGUAGE_JAPANESE) {			  ShellExecute(HWND_DESKTOP, NULL, "http://timidity-docs.sourceforge.jp/cgi-bin/kagemai-ja/guest.cgi", NULL, NULL, SW_SHOWNORMAL);		  } else {			  ShellExecute(HWND_DESKTOP, NULL, "http://timidity-docs.sourceforge.jp/cgi-bin/kagemai-en/guest.cgi", NULL, NULL, SW_SHOWNORMAL);		  }		  break;      case IDM_MHONLINEHELPCFG:		  ShellExecute(HWND_DESKTOP, NULL, "http://timidity-docs.sourceforge.jp/cgi-bin/hiki/hiki.cgi?%28ja%29timidity.cfg", NULL, NULL, SW_SHOWNORMAL);		  break;      case IDM_MHVERSION:		  VersionWnd(hwnd);		  break;      case IDM_MHTIMIDITY:		  TiMidityWnd(hwnd);		  break;      case IDM_FORCE_RELOAD:		  if (!w32g_play_active) {reload_cfg();}		  break;      case IDM_MHSUPPLEMENT:		  SupplementWnd(hwnd);		  break;	  default:		  UpdateOutputMenu(hwnd, wId);		  break;    }}