/*------------------------------------------------ browse sound file --------------------------------------------------*/ void OnSanshoAlarm(HWND hDlg, WORD id) { char deffile[MAX_PATH], fname[MAX_PATH]; GetDlgItemText(hDlg, id - 1, deffile, MAX_PATH); if(!BrowseSoundFile(hDlg, deffile, fname)) // soundselect.c return; SetDlgItemText(hDlg, id - 1, fname); PostMessage(hDlg, WM_NEXTDLGCTL, 1, FALSE); }
/*------------------------------------------------ "..." button - select file --------------------------------------------------*/ void OnBrowse(HWND hDlg) { char deffile[MAX_PATH], fname[MAX_PATH]; GetDlgItemText(hDlg, IDC_TIMERFILE, deffile, MAX_PATH); // ../common/soundselect.c if(!BrowseSoundFile(g_hInst, hDlg, deffile, fname)) return; SetDlgItemText(hDlg, IDC_TIMERFILE, fname); PostMessage(hDlg, WM_NEXTDLGCTL, 1, FALSE); }