19#define ID_SOUND_TEST_TIMER 1
142 if (pCurMap->
Next == pMap)
147 pCurMap = pCurMap->
Next;
200 pGlobalData->
pAppMap = pCurMap;
210 while (pLabelContext)
217 return pLabelContext;
219 pLabelContext = pLabelContext->
Next;
234 return pLabelContext;
256 cbValue =
sizeof(szDesc);
268 cbValue =
sizeof(szData);
314 L"AppEvents\\EventLabels",
348 return (dwCount != 0);
357 DWORD cbValue, dwResult;
370 cbValue =
sizeof(szValue);
416 DWORD dwName, dwCurKey, dwResult, dwNumSchemes;
420 cbDefault =
sizeof(pGlobalData->
szDefault);
472 LRESULT lCount, lIndex, lResult;
483 for (lIndex = 0; lIndex < lCount; lIndex++)
504 LRESULT lCount, lIndex, lResult;
514 for (lIndex = 0; lIndex < lCount; lIndex++)
541 DWORD cbValue, cchLength;
544 BOOL bCurrentProfile, bActiveProfile;
546 bCurrentProfile = !
_wcsicmp(szProfile,
L".Current");
558 cbValue =
sizeof(szValue);
581 if (cchLength == 0 || cchLength >
_countof(szBuffer))
589 else if (!bActiveProfile)
615 pLabel =
FindLabel(pGlobalData, pAppMap, szLabelName);
651 return dwNumProfiles;
683 cbValue =
sizeof(szDefault);
696 cbValue =
sizeof(szIcon);
783 return (dwNumApps != 0);
794 L"AppEvents\\Schemes",
881 LRESULT lCount, lIndex, lResult;
890 for (lIndex = 0; lIndex < lCount; lIndex++)
898 pSoundPath = (
PWSTR)lResult;
907 LRESULT lCount, lIndex, lResult;
916 for (lIndex = 0; lIndex < lCount; lIndex++)
919 if (lResult ==
CB_ERR || lResult == 0)
922 pszPath = (
LPWSTR)lResult;
923 if (
_wcsicmp(pszPath, pSoundPath) == 0)
965 pAppMap = pGlobalData->
pAppMap;
1009 pLabelMap = pLabelMap->
Next;
1011 pAppMap = pAppMap->
Next;
1044 L"AppEvents\\Schemes",
1056 L"AppEvents\\Schemes\\Apps",
1066 while (pLabelContext)
1077 pLabelContext = pLabelContext->
Next;
1102 EndResource - StartResource,
1108 for (
i = StartResource;
i <= EndResource &&
ret != -1;
i++)
1188 ZeroMemory(&statusParms,
sizeof(statusParms));
1213 if (dwDuration == 0)
1416 if (lResult ==
CB_ERR || lResult == 0)
1418 if (lIndex != pLabelContext->
szValue[0])
1513 LRESULT lCount, lIndex, lResult;
1522 if (pLabelContext ==
NULL)
1546 for (lIndex = 0; lIndex < lCount; lIndex++)
1549 if (lResult ==
CB_ERR || lResult == 0)
static FILEDATA FileData[MAX_FDS]
#define RegCloseKey(hKey)
#define OFN_FILEMUSTEXIST
static CHAR AppName[MAX_PATH]
#define IDI_SOUND_ASSIGNED
#define IDI_SOUND_SECTION
#define IMAGE_SOUND_ASSIGNED
#define IDS_WAVE_FILES_FILTER
#define IMAGE_SOUND_SECTION
#define IDS_BROWSE_FOR_SOUND
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
INT WINAPI ImageList_AddMasked(HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
BOOL WINAPI GetOpenFileNameW(OPENFILENAMEW *ofn)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
DWORD WINAPI mciSendCommandW(MCIDEVICEID wDevID, UINT wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
GLuint GLuint GLsizei GLenum type
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] STATPROPSETSTG *rgelt, [out] ULONG *pceltFetched)
TCHAR szTitle[MAX_LOADSTRING]
#define MCI_FORMAT_MILLISECONDS
#define MCI_SET_TIME_FORMAT
#define MCI_STATUS_LENGTH
#define FILE_ATTRIBUTE_DIRECTORY
BOOL WINAPI PlaySoundW(LPCWSTR pszSoundW, HMODULE hmod, DWORD fdwSound)
static const WCHAR szName[]
#define CONST_STR_LEN(str)
#define PropSheet_Changed(d, w)
#define TreeView_DeleteAllItems(hwnd)
struct tagNMTREEVIEWW * LPNMTREEVIEWW
#define TreeView_GetSelection(hwnd)
#define TreeView_GetItem(hwnd, pitem)
#define ImageList_AddIcon(himl, hicon)
#define TreeView_SetImageList(hwnd, himl, iImage)
#define TreeView_InsertItem(hwnd, lpis)
#define TVIF_SELECTEDIMAGE
#define TreeView_SetItem(hwnd, pitem)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP wchar_t *__cdecl _wcsdup(_In_z_ const wchar_t *_Str)
INT_PTR CALLBACK SoundsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
struct _GLOBAL_DATA GLOBAL_DATA
BOOL LoadSoundFiles(HWND hwndDlg)
static DWORD GetSoundDuration(LPCWSTR pFileName)
Get the duration of a waveform audio file.
struct _SOUND_SCHEME_CONTEXT SOUND_SCHEME_CONTEXT
VOID RemoveLabel(PGLOBAL_DATA pGlobalData, PLABEL_MAP pMap)
PLABEL_CONTEXT FindLabelContext(PGLOBAL_DATA pGlobalData, PSOUND_SCHEME_CONTEXT pSoundScheme, PCWSTR AppName, PCWSTR LabelName)
DWORD ImportAppProfile(PGLOBAL_DATA pGlobalData, HWND hwndDlg, HKEY hKey, PCWSTR szAppName)
static BOOL StartSoundTest(HWND hwndDlg, LPCWSTR pszSound)
HIMAGELIST InitImageList(UINT StartResource, UINT EndResource, UINT Width, UINT Height, ULONG type)
DWORD EnumerateSoundProfiles(PGLOBAL_DATA pGlobalData, HWND hwndDlg, HKEY hKey)
LPWSTR MakeFilter(LPWSTR psz)
static LRESULT FindSoundFileInList(HWND hwndDlg, LPCWSTR pSoundPath)
BOOL LoadEventLabels(PGLOBAL_DATA pGlobalData)
static VOID FreeAppMap(PGLOBAL_DATA pGlobalData)
static VOID FreeSoundProfiles(HWND hwndDlg)
DWORD ImportSoundEntry(PGLOBAL_DATA pGlobalData, HWND hwndDlg, HKEY hKey, PCWSTR szLabelName, PCWSTR szAppName, PAPP_MAP pAppMap)
PAPP_MAP FindApp(PGLOBAL_DATA pGlobalData, PCWSTR szName)
BOOL ImportSoundLabel(PGLOBAL_DATA pGlobalData, HWND hwndDlg, HKEY hKey, PCWSTR szProfile, PCWSTR szLabelName, PCWSTR szAppName, PAPP_MAP AppMap, PLABEL_MAP LabelMap)
struct _LABEL_CONTEXT * PLABEL_CONTEXT
BOOL ApplyChanges(HWND hwndDlg)
struct _APP_MAP * PAPP_MAP
#define ID_SOUND_TEST_TIMER
struct _LABEL_MAP * PLABEL_MAP
struct _SOUND_SCHEME_CONTEXT * PSOUND_SCHEME_CONTEXT
struct _GLOBAL_DATA * PGLOBAL_DATA
struct _LABEL_MAP LABEL_MAP
static VOID FreeLabelMap(PGLOBAL_DATA pGlobalData)
BOOL AddSoundProfile(HWND hwndDlg, HKEY hKey, PCWSTR szSubKey, BOOL SetDefault)
BOOL LoadSoundProfiles(PGLOBAL_DATA pGlobalData, HWND hwndDlg)
PLABEL_MAP FindLabel(PGLOBAL_DATA pGlobalData, PAPP_MAP pAppMap, PCWSTR szName)
PSOUND_SCHEME_CONTEXT FindSoundProfile(HWND hwndDlg, PCWSTR szName)
BOOL LoadEventLabel(PGLOBAL_DATA pGlobalData, HKEY hKey, PCWSTR szSubKey)
BOOL ShowSoundScheme(PGLOBAL_DATA pGlobalData, HWND hwndDlg)
static VOID FreeSoundFiles(HWND hwndDlg)
BOOL ImportSoundProfiles(PGLOBAL_DATA pGlobalData, HWND hwndDlg, HKEY hKey)
static BOOL StopSoundTest(HWND hwndDlg)
struct _LABEL_CONTEXT LABEL_CONTEXT
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
HIMAGELIST hSoundsImageList
WCHAR szDefault[MAX_PATH]
struct _LABEL_CONTEXT * Next
PLABEL_CONTEXT LabelContext
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
#define ComboBox_SetCurSel(hwndCtl, index)
#define ComboBox_GetItemData(hwndCtl, index)
#define ComboBox_GetCount(hwndCtl)
#define ComboBox_GetCurSel(hwndCtl)
#define ComboBox_DeleteString(hwndCtl, index)
#define ComboBox_AddString(hwndCtl, lpsz)
#define ComboBox_SetItemData(hwndCtl, index, data)
UINT WINAPI waveOutGetNumDevs(void)
#define HKEY_CURRENT_USER
#define GetWindowLongPtrW
#define LR_LOADTRANSPARENT
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI SetFocus(_In_opt_ HWND)
struct tagNMHDR * LPNMHDR
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND WINAPI GetParent(_In_ HWND)
#define MAKEINTRESOURCEW(i)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetWindowLongPtrW
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI DestroyIcon(_In_ HICON)