ReactOS  0.4.15-dev-5492-g47f3a4e
mmsys.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <wingdi.h>
#include <winuser.h>
#include <mmsystem.h>
#include <cpl.h>
#include <setupapi.h>
#include <stdlib.h>
#include <strsafe.h>
#include "resource.h"
Include dependency graph for mmsys.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _APPLET
 

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define CONST_STR_LEN(str)   (_countof(str) - 1)
 
#define DRVM_MAPPER   0x2000
 
#define DRVM_MAPPER_PREFERRED_GET   (DRVM_MAPPER + 21)
 
#define DRVM_MAPPER_PREFERRED_SET   (DRVM_MAPPER + 22)
 
#define VOLUME_MIN   0
 
#define VOLUME_MAX   500
 
#define VOLUME_TICFREQ   50
 
#define VOLUME_PAGESIZE   100
 

Typedefs

typedef struct _APPLET APPLET
 
typedef struct _APPLETPAPPLET
 

Functions

VOID InitPropSheetPage (PROPSHEETPAGEW *psp, WORD idDlg, DLGPROC DlgProc)
 
LONG APIENTRY MmSysApplet (HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK SoundsDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK VolumeDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK VoiceDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK AudioDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR SpeakerVolume (HWND hwndDlg)
 

Variables

HINSTANCE hApplet
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 7 of file mmsys.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 8 of file mmsys.h.

◆ CONST_STR_LEN

#define CONST_STR_LEN (   str)    (_countof(str) - 1)

Definition at line 23 of file mmsys.h.

◆ DRVM_MAPPER

#define DRVM_MAPPER   0x2000

Definition at line 38 of file mmsys.h.

◆ DRVM_MAPPER_PREFERRED_GET

#define DRVM_MAPPER_PREFERRED_GET   (DRVM_MAPPER + 21)

Definition at line 39 of file mmsys.h.

◆ DRVM_MAPPER_PREFERRED_SET

#define DRVM_MAPPER_PREFERRED_SET   (DRVM_MAPPER + 22)

Definition at line 40 of file mmsys.h.

◆ VOLUME_MAX

#define VOLUME_MAX   500

Definition at line 43 of file mmsys.h.

◆ VOLUME_MIN

#define VOLUME_MIN   0

Definition at line 42 of file mmsys.h.

◆ VOLUME_PAGESIZE

#define VOLUME_PAGESIZE   100

Definition at line 45 of file mmsys.h.

◆ VOLUME_TICFREQ

#define VOLUME_TICFREQ   50

Definition at line 44 of file mmsys.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 6 of file mmsys.h.

Typedef Documentation

◆ APPLET

◆ PAPPLET

typedef struct _APPLET * PAPPLET

Function Documentation

◆ AudioDlgProc()

INT_PTR CALLBACK AudioDlgProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 241 of file audio.c.

245 {
246  PGLOBAL_DATA pGlobalData;
247 
248  pGlobalData = (PGLOBAL_DATA)GetWindowLongPtrW(hwndDlg, DWLP_USER);
249 
250  switch (uMsg)
251  {
252  case WM_INITDIALOG:
253  {
254  UINT NumWavOut = waveOutGetNumDevs();
255 
256  pGlobalData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GLOBAL_DATA));
257  SetWindowLongPtrW(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
258 
259  if (!pGlobalData)
260  break;
261 
262  InitAudioDlg(hwndDlg, pGlobalData);
263 
264  if (!NumWavOut)
265  {
276  }
277 
278  if (pGlobalData->bNoAudioOut)
279  {
283  }
284 
285  if (pGlobalData->bNoAudioIn)
286  {
290  }
291 
292  if (pGlobalData->bNoMIDIOut)
293  {
297  }
298  }
299  break;
300 
301  case WM_COMMAND:
302  {
303  STARTUPINFOW si;
306 
307  if (!pGlobalData)
308  break;
309 
310  switch (LOWORD(wParam))
311  {
312  case IDC_VOLUME1_BTN:
313  {
314  StringCchPrintfW(szPath, _countof(szPath), L"sndvol32.exe -d %d",
316 
317  ZeroMemory(&si, sizeof(si));
318  si.cb = sizeof(si);
320  si.wShowWindow = SW_SHOW;
321 
322  if (CreateProcessW(NULL, szPath, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
323  {
324  CloseHandle(pi.hProcess);
325  CloseHandle(pi.hThread);
326  }
327  }
328  break;
329 
330  case IDC_ADV2_BTN:
331  {
332 
333  }
334  break;
335 
336  case IDC_VOLUME2_BTN:
337  {
338  StringCchPrintfW(szPath, _countof(szPath), L"sndvol32.exe -r -d %d",
340 
341  ZeroMemory(&si, sizeof(si));
342  si.cb = sizeof(si);
344  si.wShowWindow = SW_SHOW;
345 
346  if (CreateProcessW(NULL, szPath, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
347  {
348  CloseHandle(pi.hProcess);
349  CloseHandle(pi.hThread);
350  }
351  }
352  break;
353 
354  case IDC_ADV1_BTN:
355  {
356 
357  }
358  break;
359 
360  case IDC_VOLUME3_BTN:
361  {
362  StringCchPrintfW(szPath, _countof(szPath), L"sndvol32.exe -d %d",
364 
365  ZeroMemory(&si, sizeof(si));
366  si.cb = sizeof(si);
368  si.wShowWindow = SW_SHOW;
369 
370  if (CreateProcessW(NULL, szPath, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
371  {
372  CloseHandle(pi.hProcess);
373  CloseHandle(pi.hThread);
374  }
375  }
376  break;
377 
378  case IDC_ADV3_BTN:
379  {
380 
381  }
382  break;
383 
385  {
386  if (HIWORD(wParam) == CBN_SELCHANGE)
387  {
388  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
389  pGlobalData->bAudioOutChanged = TRUE;
390  }
391  }
392  break;
393 
394  case IDC_DEVICE_REC_LIST:
395  {
396  if (HIWORD(wParam) == CBN_SELCHANGE)
397  {
398  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
399  pGlobalData->bAudioInChanged = TRUE;
400  }
401  }
402 
404  {
405  if (HIWORD(wParam) == CBN_SELCHANGE)
406  {
407  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
408  pGlobalData->bMIDIOutChanged = TRUE;
409  }
410  }
411  break;
412  }
413  }
414  break;
415 
416  case WM_DESTROY:
417  if (!pGlobalData)
418  break;
419 
420  HeapFree(GetProcessHeap(), 0, pGlobalData);
421  break;
422 
423  case WM_NOTIFY:
424  if (!pGlobalData)
425  break;
426 
427  if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
428  {
429  SaveAudioDlg(hwndDlg, pGlobalData);
430  }
431  return TRUE;
432  }
433 
434  return FALSE;
435 }
BOOL bAudioInChanged
Definition: audio.c:20
#define CloseHandle
Definition: compat.h:739
#define IDC_DEVICE_MIDI_LIST
Definition: resource.h:44
struct _GLOBAL_DATA * PGLOBAL_DATA
#define TRUE
Definition: types.h:120
BOOL bNoAudioOut
Definition: audio.c:15
#define IDC_VOLUME1_BTN
Definition: resource.h:55
#define ZeroMemory
Definition: winbase.h:1670
BOOL bMIDIOutChanged
Definition: audio.c:21
#define GetWindowLongPtrW
Definition: winuser.h:4819
#define PSN_APPLY
Definition: prsht.h:117
#define MIXER_OBJECTF_MIDIOUT
Definition: mmsystem.h:306
VOID InitAudioDlg(HWND hwnd, PGLOBAL_DATA pGlobalData)
Definition: audio.c:26
WPARAM wParam
Definition: combotst.c:138
#define IDC_ADV2_BTN
Definition: resource.h:56
VOID SaveAudioDlg(HWND hwnd, PGLOBAL_DATA pGlobalData)
Definition: audio.c:191
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
#define IDC_DEVICE_REC_LIST
Definition: resource.h:43
static UINT GetDevNum(HWND hControl, DWORD Id)
Definition: audio.c:219
UINT WINAPI waveOutGetNumDevs(void)
Definition: winmm.c:2140
#define STARTF_USESHOWWINDOW
Definition: winbase.h:491
#define SW_SHOW
Definition: winuser.h:769
BOOL bNoAudioIn
Definition: audio.c:16
#define IDC_DEFAULT_DEV_CHECKBOX
Definition: resource.h:41
#define WM_DESTROY
Definition: winuser.h:1599
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4594
#define GetProcessHeap()
Definition: compat.h:736
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
DWORD cb
Definition: winbase.h:852
#define MIXER_OBJECTF_WAVEIN
Definition: mmsystem.h:304
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
static refpint_t pi[]
Definition: server.c:96
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
#define DWLP_USER
Definition: winuser.h:866
WORD wShowWindow
Definition: winbase.h:864
#define MIXER_OBJECTF_WAVEOUT
Definition: mmsystem.h:302
#define WM_COMMAND
Definition: winuser.h:1730
Definition: inflate.c:139
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND WINAPI GetParent(_In_ HWND)
#define IDC_DEVICE_PLAY_LIST
Definition: resource.h:42
LPCWSTR szPath
Definition: env.c:37
#define IDC_VOLUME3_BTN
Definition: resource.h:59
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
#define IDC_VOLUME2_BTN
Definition: resource.h:57
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define CBN_SELCHANGE
Definition: winuser.h:1969
#define IDC_ADV1_BTN
Definition: resource.h:58
#define HIWORD(l)
Definition: typedefs.h:247
#define SetWindowLongPtrW
Definition: winuser.h:5336
DWORD dwFlags
Definition: winbase.h:863
#define WM_INITDIALOG
Definition: winuser.h:1729
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define HeapFree(x, y, z)
Definition: compat.h:735
BOOL bAudioOutChanged
Definition: audio.c:19
BOOL bNoMIDIOut
Definition: audio.c:17
#define WM_NOTIFY
Definition: richedit.h:61
#define IDC_ADV3_BTN
Definition: resource.h:60

Referenced by MmSysApplet(), ShowAudioPropertySheet(), and ShowFullControlPanel().

◆ InitPropSheetPage()

VOID InitPropSheetPage ( PROPSHEETPAGEW psp,
WORD  idDlg,
DLGPROC  DlgProc 
)

Definition at line 728 of file mmsys.c.

731 {
732  ZeroMemory(psp, sizeof(PROPSHEETPAGEW));
733  psp->dwSize = sizeof(PROPSHEETPAGEW);
734  psp->dwFlags = PSP_DEFAULT;
735  psp->hInstance = hApplet;
737  psp->pfnDlgProc = DlgProc;
738 }
WORD idDlg
Definition: desk.c:110
LPCWSTR pszTemplate
Definition: prsht.h:218
#define ZeroMemory
Definition: winbase.h:1670
DWORD dwSize
Definition: prsht.h:214
DLGPROC pfnDlgProc
Definition: prsht.h:226
struct _PROPSHEETPAGEW PROPSHEETPAGEW
HINSTANCE hApplet
Definition: mmsys.c:103
#define PSP_DEFAULT
Definition: prsht.h:22
HINSTANCE hInstance
Definition: prsht.h:216
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
DLGPROC DlgProc
Definition: desk.c:111
DWORD dwFlags
Definition: prsht.h:215

Referenced by MmSysApplet(), ShowAudioPropertySheet(), and ShowFullControlPanel().

◆ MmSysApplet()

LONG APIENTRY MmSysApplet ( HWND  hwnd,
UINT  uMsg,
LPARAM  wParam,
LPARAM  lParam 
)

Definition at line 690 of file mmsys.c.

694 {
695  PROPSHEETPAGEW psp[5];
696  PROPSHEETHEADERW psh; // = { 0 };
697  INT nPage = 0;
698 
700 
701  if (uMsg == CPL_STARTWPARMSW && lParam != 0)
702  nPage = _wtoi((PWSTR)lParam);
703 
704  psh.dwSize = sizeof(PROPSHEETHEADERW);
706  psh.hwndParent = hwnd;
707  psh.hInstance = hApplet;
710  psh.nPages = _countof(psp);
711  psh.nStartPage = 0;
712  psh.ppsp = psp;
714 
720 
721  if (nPage != 0 && nPage <= psh.nPages)
722  psh.nStartPage = nPage;
723 
724  return (LONG)(PropertySheetW(&psh) != -1);
725 }
HWND hwndParent
Definition: prsht.h:295
LPCPROPSHEETPAGEW ppsp
Definition: prsht.h:308
VOID InitPropSheetPage(PROPSHEETPAGEW *psp, WORD idDlg, DLGPROC DlgProc)
Definition: mmsys.c:728
INT_PTR CALLBACK AudioDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: audio.c:241
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
uint16_t * PWSTR
Definition: typedefs.h:56
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
#define IDD_VOLUME
Definition: resource.h:19
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: mmsys.c:673
struct _PROPSHEETHEADERW PROPSHEETHEADERW
#define PSH_USECALLBACK
Definition: prsht.h:48
int32_t INT
Definition: typedefs.h:58
WPARAM wParam
Definition: combotst.c:138
#define IDD_AUDIO
Definition: resource.h:21
#define IDS_CPLNAME
Definition: resource.h:8
#define PSH_USEICONID
Definition: prsht.h:42
LPCWSTR pszCaption
Definition: prsht.h:301
long LONG
Definition: pedump.c:60
PFNPROPSHEETCALLBACK pfnCallback
Definition: prsht.h:311
HINSTANCE hApplet
Definition: mmsys.c:103
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2905
INT_PTR CALLBACK SoundsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: sounds.c:1119
#define PSH_PROPTITLE
Definition: prsht.h:40
HINSTANCE hInstance
Definition: prsht.h:296
#define _countof(array)
Definition: sndvol32.h:68
#define IDD_HARDWARE
Definition: resource.h:29
LPCWSTR pszIcon
Definition: prsht.h:299
#define IDI_CPLICON
Definition: resource.h:4
DWORD dwSize
Definition: prsht.h:293
#define CPL_STARTWPARMSW
Definition: cpl.h:21
DWORD dwFlags
Definition: prsht.h:294
#define IDD_SOUNDS
Definition: resource.h:20
#define IDD_VOICE
Definition: resource.h:22
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
INT_PTR CALLBACK VoiceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: voice.c:15
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
static INT_PTR CALLBACK HardwareDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: mmsys.c:645
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
LPARAM lParam
Definition: combotst.c:139
INT_PTR CALLBACK VolumeDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: volume.c:388
UINT nStartPage
Definition: prsht.h:304

◆ SoundsDlgProc()

INT_PTR CALLBACK SoundsDlgProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Should store in current member

Definition at line 1119 of file sounds.c.

1123 {
1124  PGLOBAL_DATA pGlobalData;
1125 
1128  WCHAR szFilter[256], szTitle[256];
1129  LPWSTR pFileName;
1130  LRESULT lResult;
1131 
1132  pGlobalData = (PGLOBAL_DATA)GetWindowLongPtrW(hwndDlg, DWLP_USER);
1133 
1134  switch (uMsg)
1135  {
1136  case WM_INITDIALOG:
1137  {
1139  SetWindowLongPtrW(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
1140 
1141  pGlobalData->NumWavOut = waveOutGetNumDevs();
1142 
1146 
1151  IMAGE_ICON);
1152 
1153  LoadEventLabels(pGlobalData);
1154  LoadSoundProfiles(pGlobalData, hwndDlg);
1155  LoadSoundFiles(hwndDlg);
1156  ShowSoundScheme(pGlobalData, hwndDlg);
1157 
1158  if (wParam == (WPARAM)GetDlgItem(hwndDlg, IDC_SOUND_SCHEME))
1159  return TRUE;
1161  return FALSE;
1162  }
1163  case WM_COMMAND:
1164  {
1165  switch (LOWORD(wParam))
1166  {
1167  case IDC_BROWSE_SOUND:
1168  {
1169  ZeroMemory(&ofn, sizeof(ofn));
1170  ofn.lStructSize = sizeof(ofn);
1171  ofn.hwndOwner = hwndDlg;
1173  ofn.lpstrFile[0] = UNICODE_NULL;
1177  ofn.nFilterIndex = 0;
1180  ofn.lpstrInitialDir = L"%SystemRoot%\\Media";
1182 
1183  if (GetOpenFileNameW(&ofn))
1184  {
1185  // FIXME search if list already contains that sound
1186 
1187  // extract file name
1188  pFileName = wcsrchr(filename, L'\\');
1189  ASSERT(pFileName != NULL);
1190  pFileName++;
1191 
1192  // add to list
1193  lResult = SendDlgItemMessageW(hwndDlg, IDC_SOUND_LIST, CB_ADDSTRING, 0, (LPARAM)pFileName);
1194  if (lResult != CB_ERR)
1195  {
1196  // add path and select item
1198  SendDlgItemMessageW(hwndDlg, IDC_SOUND_LIST, CB_SETCURSEL, (WPARAM)lResult, 0);
1199  }
1200  }
1201  break;
1202  }
1203  case IDC_PLAY_SOUND:
1204  {
1205  LRESULT lIndex;
1206  lIndex = ComboBox_GetCurSel(GetDlgItem(hwndDlg, IDC_SOUND_LIST));
1207  if (lIndex == CB_ERR)
1208  {
1209  break;
1210  }
1211 
1212  lIndex = ComboBox_GetItemData(GetDlgItem(hwndDlg, IDC_SOUND_LIST), lIndex);
1213  if (lIndex != CB_ERR)
1214  {
1215  PlaySoundW((PWCHAR)lIndex, NULL, SND_FILENAME);
1216  }
1217  break;
1218  }
1219  case IDC_SOUND_SCHEME:
1220  {
1221  if (HIWORD(wParam) == CBN_SELENDOK)
1222  {
1224  ShowSoundScheme(pGlobalData, hwndDlg);
1229  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
1230  }
1231  break;
1232  }
1233  case IDC_SOUND_LIST:
1234  {
1235  if (HIWORD(wParam) == CBN_SELENDOK)
1236  {
1237  PLABEL_CONTEXT pLabelContext;
1238  HTREEITEM hItem;
1239  TVITEMW item;
1240  LRESULT lIndex;
1241 
1243  if (hItem == NULL)
1244  {
1245  break;
1246  }
1247 
1248  lIndex = ComboBox_GetCurSel(GetDlgItem(hwndDlg, IDC_SOUND_LIST));
1249  if (lIndex == CB_ERR)
1250  {
1251  break;
1252  }
1253 
1254  ZeroMemory(&item, sizeof(item));
1255  item.mask = TVIF_PARAM;
1256  item.hItem = hItem;
1258  {
1259  LRESULT lResult;
1260  pLabelContext = (PLABEL_CONTEXT)item.lParam;
1261 
1262  lResult = ComboBox_GetItemData(GetDlgItem(hwndDlg, IDC_SOUND_LIST), lIndex);
1263  if (lResult == CB_ERR || lResult == 0)
1264  {
1265  if (lIndex != pLabelContext->szValue[0])
1266  {
1267  /* Update the tree view item image */
1269  item.iImage = IMAGE_SOUND_NONE;
1270  item.iSelectedImage = IMAGE_SOUND_NONE;
1272 
1273  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
1274 
1276  }
1277 
1278  pLabelContext->szValue[0] = UNICODE_NULL;
1279 
1280  break;
1281  }
1282 
1283  if (_wcsicmp(pLabelContext->szValue, (PWCHAR)lResult) || (lIndex != pLabelContext->szValue[0]))
1284  {
1285  /* Update the tree view item image */
1287  item.iImage = IMAGE_SOUND_ASSIGNED;
1288  item.iSelectedImage = IMAGE_SOUND_ASSIGNED;
1290 
1291  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
1292 
1296  StringCchCopyW(pLabelContext->szValue, _countof(pLabelContext->szValue), (PWCHAR)lResult);
1297  }
1298 
1299  if (wcslen((PWCHAR)lResult) && lIndex != 0 && pGlobalData->NumWavOut != 0)
1300  {
1302  }
1303  else
1304  {
1306  }
1307  }
1308  }
1309  break;
1310  }
1311  }
1312  break;
1313  }
1314  case WM_DESTROY:
1315  {
1316  FreeSoundFiles(hwndDlg);
1317  FreeSoundProfiles(hwndDlg);
1318  FreeAppMap(pGlobalData);
1319  FreeLabelMap(pGlobalData);
1320  if (pGlobalData->hSoundsImageList)
1321  ImageList_Destroy(pGlobalData->hSoundsImageList);
1322  HeapFree(GetProcessHeap(), 0, pGlobalData);
1323  break;
1324  }
1325  case WM_NOTIFY:
1326  {
1327  PLABEL_CONTEXT pLabelContext;
1328  PWCHAR ptr;
1329 
1330  LPNMHDR lpnm = (LPNMHDR)lParam;
1331 
1332  switch (lpnm->code)
1333  {
1334  case PSN_APPLY:
1335  {
1336  ApplyChanges(hwndDlg);
1337  break;
1338  }
1339  case TVN_SELCHANGED:
1340  {
1342  LRESULT lCount, lIndex, lResult;
1343 
1344  pLabelContext = (PLABEL_CONTEXT)nm->itemNew.lParam;
1345  if (pLabelContext == NULL)
1346  {
1351  return FALSE;
1352  }
1353 
1357 
1358  if (wcslen(pLabelContext->szValue) == 0)
1359  {
1360  lIndex = ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_SOUND_LIST), 0);
1362  break;
1363  }
1364 
1365  if (pGlobalData->NumWavOut != 0)
1367 
1368  lCount = ComboBox_GetCount(GetDlgItem(hwndDlg, IDC_SOUND_LIST));
1369  for (lIndex = 0; lIndex < lCount; lIndex++)
1370  {
1371  lResult = ComboBox_GetItemData(GetDlgItem(hwndDlg, IDC_SOUND_LIST), lIndex);
1372  if (lResult == CB_ERR || lResult == 0)
1373  continue;
1374 
1375  if (!wcscmp((PWCHAR)lResult, pLabelContext->szValue))
1376  {
1377  ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_SOUND_LIST), lIndex);
1378  return FALSE;
1379  }
1380  }
1381 
1382  ptr = wcsrchr(pLabelContext->szValue, L'\\');
1383  if (ptr)
1384  {
1385  ptr++;
1386  }
1387  else
1388  {
1389  ptr = pLabelContext->szValue;
1390  }
1391 
1392  lIndex = ComboBox_AddString(GetDlgItem(hwndDlg, IDC_SOUND_LIST), ptr);
1393  if (lIndex != CB_ERR)
1394  {
1395  ComboBox_SetItemData(GetDlgItem(hwndDlg, IDC_SOUND_LIST), lIndex, _wcsdup(pLabelContext->szValue));
1396  ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_SOUND_LIST), lIndex);
1397  }
1398  break;
1399  }
1400  }
1401  }
1402  break;
1403  }
1404 
1405  return FALSE;
1406 }
#define OFN_FILEMUSTEXIST
Definition: commdlg.h:106
#define OFN_EXPLORER
Definition: commdlg.h:104
#define CB_SETITEMDATA
Definition: winuser.h:1956
HIMAGELIST InitImageList(UINT StartResource, UINT EndResource, UINT Width, UINT Height, ULONG type)
Definition: sounds.c:1056
#define IDC_PLAY_SOUND
Definition: resource.h:48
BOOL LoadSoundProfiles(PGLOBAL_DATA pGlobalData, HWND hwndDlg)
Definition: sounds.c:784
#define IMAGE_ICON
Definition: winuser.h:212
#define ComboBox_AddString(hwndCtl, lpsz)
Definition: windowsx.h:41
#define IDI_SOUND_ASSIGNED
Definition: resource.h:11
HWND hwndOwner
Definition: commdlg.h:330
#define TreeView_DeleteAllItems(hwnd)
Definition: commctrl.h:3417
#define IDS_BROWSE_FOR_SOUND
Definition: resource.h:84
#define TRUE
Definition: types.h:120
BOOL ShowSoundScheme(PGLOBAL_DATA pGlobalData, HWND hwndDlg)
Definition: sounds.c:900
BOOL ApplyChanges(HWND hwndDlg)
Definition: sounds.c:987
HIMAGELIST hSoundsImageList
Definition: sounds.c:56
LPARAM lParam
Definition: commctrl.h:3325
OPENFILENAME ofn
Definition: main.cpp:37
BOOL LoadSoundFiles(HWND hwndDlg)
Definition: sounds.c:812
#define IDC_SOUND_LIST
Definition: resource.h:40
#define ZeroMemory
Definition: winbase.h:1670
#define ComboBox_GetCurSel(hwndCtl)
Definition: windowsx.h:49
HWND WINAPI SetFocus(_In_opt_ HWND)
HINSTANCE hApplet
Definition: access.c:17
UINT_PTR WPARAM
Definition: windef.h:207
#define GetWindowLongPtrW
Definition: winuser.h:4819
#define TVIF_SELECTEDIMAGE
Definition: commctrl.h:3271
uint16_t * PWCHAR
Definition: typedefs.h:56
#define PSN_APPLY
Definition: prsht.h:117
if(dx==0 &&dy==0)
Definition: linetemp.h:174
const char * filename
Definition: ioapi.h:137
#define BM_SETIMAGE
Definition: winuser.h:1912
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
WPARAM wParam
Definition: combotst.c:138
struct tagNMHDR * LPNMHDR
DWORD nMaxFile
Definition: commdlg.h:337
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
UINT code
Definition: winuser.h:3149
struct _LABEL_CONTEXT * PLABEL_CONTEXT
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
#define UNICODE_NULL
LPWSTR MakeFilter(LPWSTR psz)
Definition: sounds.c:64
static VOID FreeLabelMap(PGLOBAL_DATA pGlobalData)
Definition: sounds.c:149
#define CBN_SELENDOK
Definition: winuser.h:1971
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
BOOL WINAPI GetOpenFileNameW(OPENFILENAMEW *ofn)
Definition: filedlg.c:4677
static PVOID ptr
Definition: dispmode.c:27
#define CB_ADDSTRING
Definition: winuser.h:1926
HTREEITEM hItem
Definition: treelist.h:37
LONG_PTR LPARAM
Definition: windef.h:208
LPTSTR szFilter
Definition: mplay32.c:30
UINT WINAPI waveOutGetNumDevs(void)
Definition: winmm.c:2140
#define CB_ERR
Definition: winuser.h:2425
#define WM_DESTROY
Definition: winuser.h:1599
TVITEMW itemNew
Definition: commctrl.h:3638
#define IDC_SCHEME_LIST
Definition: resource.h:39
#define IDI_SOUND_SECTION
Definition: resource.h:10
#define ComboBox_GetCount(hwndCtl)
Definition: windowsx.h:48
#define TreeView_GetSelection(hwnd)
Definition: commctrl.h:3473
#define GetProcessHeap()
Definition: compat.h:736
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define ASSERT(a)
Definition: mode.c:44
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define ComboBox_GetItemData(hwndCtl, index)
Definition: windowsx.h:54
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
LPCSTR lpstrInitialDir
Definition: commdlg.h:340
#define _countof(array)
Definition: sndvol32.h:68
#define TVN_SELCHANGED
Definition: commctrl.h:3735
#define MAX_PATH
Definition: compat.h:34
#define IMAGE_SOUND_NONE
Definition: resource.h:96
DWORD lStructSize
Definition: commdlg.h:329
int WINAPI GetSystemMetrics(_In_ int)
struct _GLOBAL_DATA * PGLOBAL_DATA
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
#define IMAGE_SOUND_ASSIGNED
Definition: resource.h:95
#define SM_CXSMICON
Definition: winuser.h:1006
UINT NumWavOut
Definition: sounds.c:59
#define IDS_WAVE_FILES_FILTER
Definition: resource.h:85
#define DWLP_USER
Definition: winuser.h:866
#define IDC_SOUND_SCHEME
Definition: resource.h:38
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
#define CB_SETCURSEL
Definition: winuser.h:1951
struct tagNMTREEVIEWW * LPNMTREEVIEWW
#define WM_COMMAND
Definition: winuser.h:1730
#define wcsrchr
Definition: compat.h:16
static VOID FreeSoundProfiles(HWND hwndDlg)
Definition: sounds.c:498
#define ComboBox_SetCurSel(hwndCtl, index)
Definition: windowsx.h:66
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define IDI_PLAY_ICON
Definition: resource.h:5
#define SND_FILENAME
Definition: mmsystem.h:162
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
HWND WINAPI GetParent(_In_ HWND)
static ATOM item
Definition: dde.c:856
LPSTR lpstrFile
Definition: commdlg.h:336
#define ComboBox_SetItemData(hwndCtl, index, data)
Definition: windowsx.h:69
struct _GLOBAL_DATA GLOBAL_DATA
static VOID FreeSoundFiles(HWND hwndDlg)
Definition: sounds.c:875
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define TVIF_IMAGE
Definition: commctrl.h:3267
BOOL LoadEventLabels(PGLOBAL_DATA pGlobalData)
Definition: sounds.c:301
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define IDC_BROWSE_SOUND
Definition: resource.h:49
LPCSTR lpstrFilter
Definition: commdlg.h:332
#define NULL
Definition: types.h:112
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
WCHAR szValue[MAX_PATH]
Definition: sounds.c:42
#define TreeView_SetItem(hwnd, pitem)
Definition: commctrl.h:3497
#define IDC_TEXT_SOUND
Definition: resource.h:47
LPCSTR lpstrTitle
Definition: commdlg.h:341
#define HIWORD(l)
Definition: typedefs.h:247
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
#define SetWindowLongPtrW
Definition: winuser.h:5336
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define TVIF_PARAM
Definition: commctrl.h:3268
DWORD nFilterIndex
Definition: commdlg.h:335
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG_PTR LRESULT
Definition: windef.h:209
_Check_return_ _CRTIMP wchar_t *__cdecl _wcsdup(_In_z_ const wchar_t *_Str)
#define WM_INITDIALOG
Definition: winuser.h:1729
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define HeapFree(x, y, z)
Definition: compat.h:735
static VOID FreeAppMap(PGLOBAL_DATA pGlobalData)
Definition: sounds.c:188
#define TreeView_GetItem(hwnd, pitem)
Definition: commctrl.h:3490
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define WM_NOTIFY
Definition: richedit.h:61
DWORD Flags
Definition: commdlg.h:342
BOOL WINAPI PlaySoundW(LPCWSTR pszSoundW, HMODULE hmod, DWORD fdwSound)
Definition: playsound.c:531

Referenced by MmSysApplet(), and ShowFullControlPanel().

◆ SpeakerVolume()

INT_PTR SpeakerVolume ( HWND  hwndDlg)

Definition at line 304 of file speakervolume.c.

306 {
307  PROPSHEETPAGEW psp[1];
308  PROPSHEETHEADERW psh;
309 
310  ZeroMemory(&psh, sizeof(PROPSHEETHEADERW));
311  psh.dwSize = sizeof(PROPSHEETHEADERW);
313  psh.hwndParent = hwndDlg;
314  psh.hInstance = hApplet;
316  psh.nPages = _countof(psp);
317  psh.nStartPage = 0;
318  psh.ppsp = psp;
319 
321  psp[0].dwFlags |= PSP_USETITLE;
322  psp[0].hInstance = hApplet;
324 
325  return (LONG)(PropertySheetW(&psh) != -1);
326 }
HWND hwndParent
Definition: prsht.h:295
#define MAKEINTRESOURCE
Definition: winuser.h:591
LPCPROPSHEETPAGEW ppsp
Definition: prsht.h:308
#define IDS_SPEAKER_VOLUME
Definition: resource.h:73
#define IDD_MULTICHANNEL
Definition: resource.h:29
#define ZeroMemory
Definition: winbase.h:1670
HINSTANCE hApplet
Definition: access.c:17
struct _PROPSHEETHEADERW PROPSHEETHEADERW
LPCWSTR pszCaption
Definition: prsht.h:301
long LONG
Definition: pedump.c:60
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2905
LPCWSTR pszTitle
Definition: prsht.h:225
HINSTANCE hInstance
Definition: prsht.h:296
#define _countof(array)
Definition: sndvol32.h:68
DWORD dwSize
Definition: prsht.h:293
DWORD dwFlags
Definition: prsht.h:294
static VOID InitPropSheetPage(PROPSHEETPAGE *psp, PSERVICEPROPSHEET dlgInfo, WORD idDlg, DLGPROC DlgProc)
Definition: propsheet.c:15
HINSTANCE hInstance
Definition: prsht.h:216
#define PSP_USETITLE
Definition: prsht.h:26
INT_PTR CALLBACK SpeakerVolumeDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
DWORD dwFlags
Definition: prsht.h:215
UINT nStartPage
Definition: prsht.h:304

Referenced by VolumeDlgProc().

◆ VoiceDlgProc()

INT_PTR CALLBACK VoiceDlgProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 15 of file voice.c.

19 {
22  switch (uMsg)
23  {
24  case WM_INITDIALOG:
25  {
26  UINT NumWavOut;
27 
28  NumWavOut = waveOutGetNumDevs();
29  if (!NumWavOut)
30  {
38  }
39  }
40  break;
41  }
42 
43  return FALSE;
44 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
UINT WINAPI waveOutGetNumDevs(void)
Definition: winmm.c:2140
#define IDC_VOLUME4_BTN
Definition: resource.h:61
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDC_DEVICE_VOICE_LIST
Definition: resource.h:45
#define IDC_ADV4_BTN
Definition: resource.h:62
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define IDC_DEVICE_VOICE_REC_LIST
Definition: resource.h:46
#define IDC_TEST_HARDWARE
Definition: resource.h:65
unsigned int UINT
Definition: ndis.h:50
#define IDC_ADV5_BTN
Definition: resource.h:64
#define IDC_VOLUME5_BTN
Definition: resource.h:63
#define WM_INITDIALOG
Definition: winuser.h:1729
LPARAM lParam
Definition: combotst.c:139

Referenced by MmSysApplet(), and ShowFullControlPanel().

◆ VolumeDlgProc()

INT_PTR CALLBACK VolumeDlgProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 388 of file volume.c.

392 {
393  static const INT speakImgSize[] = {72, 72};
394  PGLOBAL_DATA pGlobalData;
395 
396  pGlobalData = (PGLOBAL_DATA)GetWindowLongPtrW(hwndDlg, DWLP_USER);
397 
398  switch (uMsg)
399  {
400  case MM_MIXM_LINE_CHANGE:
401  {
402  GetMuteState(pGlobalData);
403  if (pGlobalData->muteVal)
404  {
407  }
408  else
409  {
412  }
413  break;
414  }
416  {
417  GetVolumeValue(pGlobalData, FALSE);
418  SendDlgItemMessageW(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETPOS, (WPARAM)TRUE, (LPARAM)(pGlobalData->maxVolume - pGlobalData->volumeMinimum) / pGlobalData->volumeStep);
419  break;
420  }
421  case WM_INITDIALOG:
422  {
424  SetWindowLongPtrW(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
425 
429  pGlobalData->hIconSpeakImg = LoadImageW(hApplet,
431  IMAGE_ICON,
432  speakImgSize[0],
433  speakImgSize[1],
435 
436  InitVolumeControls(hwndDlg, pGlobalData);
437  break;
438  }
439 
440  case WM_DRAWITEM:
441  {
442  LPDRAWITEMSTRUCT lpDrawItem;
443  lpDrawItem = (LPDRAWITEMSTRUCT)lParam;
444  if (lpDrawItem->CtlID == IDC_SPEAKIMG)
445  {
446  LONG left;
447 
448  /* Position image in centre of dialog */
449  left = (lpDrawItem->rcItem.right - speakImgSize[0]) / 2;
450 
451  DrawIconEx(lpDrawItem->hDC,
452  left,
453  lpDrawItem->rcItem.top,
454  pGlobalData->hIconSpeakImg,
455  speakImgSize[0],
456  speakImgSize[1],
457  0,
458  NULL,
459  DI_NORMAL);
460  }
461  break;
462  }
463 
464  case WM_COMMAND:
465  {
466  switch (LOWORD(wParam))
467  {
468  case IDC_MUTE_CHECKBOX:
469  if (HIWORD(wParam) == BN_CLICKED)
470  {
471  SwitchMuteState(pGlobalData);
472  if (pGlobalData->muteVal)
473  {
475  }
476  else
477  {
479  }
480 
481  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
482  }
483  break;
484 
485  case IDC_ICON_IN_TASKBAR:
486  if (HIWORD(wParam) == BN_CLICKED)
487  {
488  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
489  }
490  break;
491 
492  case IDC_ADVANCED_BTN:
493  LaunchSoundControl(hwndDlg);
494  break;
495 
496  case IDC_SPEAKER_VOL_BTN:
497  SpeakerVolume(hwndDlg);
498  break;
499  }
500  break;
501  }
502 
503  case WM_HSCROLL:
504  {
505  HWND hVolumeTrackbar = GetDlgItem(hwndDlg, IDC_VOLUME_TRACKBAR);
506  if (hVolumeTrackbar == (HWND)lParam)
507  {
508  switch (LOWORD(wParam))
509  {
510  case TB_THUMBPOSITION:
511  break;
512 
513  case TB_ENDTRACK:
515  break;
516 
517  default:
518  SetVolumeValue(pGlobalData,
520  break;
521  }
522  }
523  break;
524  }
525 
526  case WM_DESTROY:
527  if (pGlobalData)
528  {
529  HeapFree(GetProcessHeap(), 0, pGlobalData->volumeCurrentValues);
530  HeapFree(GetProcessHeap(), 0, pGlobalData->volumePreviousValues);
531  HeapFree(GetProcessHeap(), 0, pGlobalData->volumeInitialValues);
532  mixerClose(pGlobalData->hMixer);
533 
534  if (pGlobalData->hIconSpeakImg)
535  DestroyIcon(pGlobalData->hIconSpeakImg);
536 
537  if (pGlobalData->hIconNoHW)
538  DestroyIcon(pGlobalData->hIconNoHW);
539 
540  if (pGlobalData->hIconMuted)
541  DestroyIcon(pGlobalData->hIconMuted);
542 
543  if (pGlobalData->hIconUnMuted)
544  DestroyIcon(pGlobalData->hIconUnMuted);
545 
546  HeapFree(GetProcessHeap(), 0, pGlobalData);
547  }
548  break;
549 
550  case WM_NOTIFY:
551  switch (((LPNMHDR)lParam)->code)
552  {
553  case PSN_APPLY:
554  SaveData(hwndDlg);
555  break;
556 
557  case PSN_RESET:
558  RestoreVolumeValue(pGlobalData);
559  break;
560  }
561  return TRUE;
562  }
563 
564  return FALSE;
565 }
PMIXERCONTROLDETAILS_UNSIGNED volumeInitialValues
Definition: volume.c:33
#define SND_ALIAS_ID
Definition: mmsystem.h:161
#define IMAGE_ICON
Definition: winuser.h:212
#define IDI_MUTED_ICON
Definition: resource.h:14
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
HICON hIconNoHW
Definition: volume.c:20
struct tagDRAWITEMSTRUCT * LPDRAWITEMSTRUCT
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
#define TRUE
Definition: types.h:120
struct _GLOBAL_DATA * PGLOBAL_DATA
#define IDI_SPEAKIMG
Definition: resource.h:69
VOID LaunchSoundControl(HWND hwndDlg)
Definition: volume.c:378
UINT WINAPI mixerClose(HMIXER hMix)
Definition: winmm.c:389
DWORD maxVolume
Definition: volume.c:32
LONG top
Definition: windef.h:307
DWORD volumeMinimum
Definition: volume.c:28
#define TBM_SETPOS
Definition: commctrl.h:2036
HINSTANCE hApplet
Definition: access.c:17
UINT_PTR WPARAM
Definition: windef.h:207
#define GetWindowLongPtrW
Definition: winuser.h:4819
#define PSN_APPLY
Definition: prsht.h:117
LONG right
Definition: windef.h:308
VOID SetVolumeValue(PGLOBAL_DATA pGlobalData, DWORD dwPosition)
Definition: volume.c:208
int32_t INT
Definition: typedefs.h:58
WPARAM wParam
Definition: combotst.c:138
VOID GetVolumeValue(PGLOBAL_DATA pGlobalData, BOOL bInit)
Definition: volume.c:172
PMIXERCONTROLDETAILS_UNSIGNED volumePreviousValues
Definition: volume.c:34
HICON hIconSpeakImg
Definition: volume.c:21
#define FALSE
Definition: types.h:117
VOID InitVolumeControls(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
Definition: volume.c:302
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
long LONG
Definition: pedump.c:60
#define IDC_VOLUME_TRACKBAR
Definition: resource.h:33
#define TBM_GETPOS
Definition: commctrl.h:2031
VOID GetMuteState(PGLOBAL_DATA pGlobalData)
Definition: volume.c:73
LONG_PTR LPARAM
Definition: windef.h:208
#define IDC_ICON_IN_TASKBAR
Definition: resource.h:37
#define WM_DESTROY
Definition: winuser.h:1599
#define SND_ALIAS_SYSTEMDEFAULT
Definition: mmsystem.h:175
#define IDC_ADVANCED_BTN
Definition: resource.h:51
#define BM_SETCHECK
Definition: winuser.h:1911
struct _GLOBAL_DATA GLOBAL_DATA
HICON hIconMuted
Definition: volume.c:18
#define GetProcessHeap()
Definition: compat.h:736
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HMIXER hMixer
Definition: volume.c:17
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
Definition: cursoricon.c:1997
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define BN_CLICKED
Definition: winuser.h:1915
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint left
Definition: glext.h:7726
#define IDI_CPLICON
Definition: resource.h:4
#define SND_ASYNC
Definition: mmsystem.h:154
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
INT_PTR SpeakerVolume(HWND hwndDlg)
#define TB_ENDTRACK
Definition: commctrl.h:2081
PMIXERCONTROLDETAILS_UNSIGNED volumeCurrentValues
Definition: volume.c:35
#define IDI_NO_HW
Definition: resource.h:13
#define DWLP_USER
Definition: winuser.h:866
static VOID RestoreVolumeValue(PGLOBAL_DATA pGlobalData)
Definition: volume.c:252
#define DI_NORMAL
Definition: wingdi.h:72
#define WM_COMMAND
Definition: winuser.h:1730
Definition: inflate.c:139
#define BST_UNCHECKED
Definition: winuser.h:199
HICON hIconUnMuted
Definition: volume.c:19
HWND WINAPI GetParent(_In_ HWND)
DWORD volumeStep
Definition: volume.c:30
#define PSN_RESET
Definition: prsht.h:118
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define NULL
Definition: types.h:112
#define WM_HSCROLL
Definition: winuser.h:1733
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define STM_SETIMAGE
Definition: winuser.h:2083
#define BST_CHECKED
Definition: winuser.h:197
#define WM_DRAWITEM
Definition: winuser.h:1635
#define IDC_MUTE_CHECKBOX
Definition: resource.h:36
#define HIWORD(l)
Definition: typedefs.h:247
LONG muteVal
Definition: volume.c:23
#define IDC_SPEAKIMG
Definition: resource.h:70
#define SetWindowLongPtrW
Definition: winuser.h:5336
#define MM_MIXM_LINE_CHANGE
Definition: mmsystem.h:82
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define IDC_MUTE_ICON
Definition: resource.h:71
#define LR_DEFAULTCOLOR
Definition: winuser.h:1081
#define TB_THUMBPOSITION
Definition: commctrl.h:2077
#define WM_INITDIALOG
Definition: winuser.h:1729
VOID SaveData(HWND hwndDlg)
Definition: volume.c:368
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define IDC_SPEAKER_VOL_BTN
Definition: resource.h:53
#define HeapFree(x, y, z)
Definition: compat.h:735
#define WM_NOTIFY
Definition: richedit.h:61
VOID SwitchMuteState(PGLOBAL_DATA pGlobalData)
Definition: volume.c:97
BOOL WINAPI PlaySoundW(LPCWSTR pszSoundW, HMODULE hmod, DWORD fdwSound)
Definition: playsound.c:531
#define MM_MIXM_CONTROL_CHANGE
Definition: mmsystem.h:83

Referenced by MmSysApplet(), and ShowFullControlPanel().

Variable Documentation

◆ hApplet

HINSTANCE hApplet

Definition at line 17 of file access.c.