Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 287 of file sounds.c.
Referenced by EnumerateSoundProfiles().
{ HKEY hSubKey; TCHAR szValue[MAX_PATH]; DWORD dwValue, dwResult; if (RegOpenKeyEx(hKey, szSubKey, 0, KEY_READ, &hSubKey) != ERROR_SUCCESS) { return FALSE; } dwValue = sizeof(szValue) / sizeof(TCHAR); dwResult = RegQueryValueEx(hSubKey, NULL, NULL, NULL, (LPBYTE)szValue, &dwValue); RegCloseKey(hSubKey); if (dwResult == ERROR_SUCCESS) { LRESULT lResult = SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_ADDSTRING, (WPARAM)0, (LPARAM)szValue); if (lResult != CB_ERR) { PSOUND_SCHEME_CONTEXT pScheme = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SOUND_SCHEME_CONTEXT)); if (pScheme != NULL) { _tcscpy(pScheme->szDesc, szValue); _tcscpy(pScheme->szName, szSubKey); } SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)pScheme); if (SetDefault) { SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_SETCURSEL, (WPARAM)lResult, (LPARAM)0); } } return TRUE; } return FALSE; }