ReactOS 0.4.15-dev-7674-gc0b4db1
volume.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Multimedia Control Panel
3 * FILE: dll/cpl/mmsys/volume.c
4 * PURPOSE: ReactOS Multimedia Control Panel
5 * PROGRAMMER: Thomas Weidenmueller <w3seek@reactos.com>
6 * Johannes Anderwald <janderwald@reactos.com>
7 * Dmitry Chapyshev <dmitry@reactos.org>
8 */
9
10#include "mmsys.h"
11
12#include <shellapi.h>
13
14
15typedef struct _GLOBAL_DATA
16{
17 HMIXER hMixer;
22
25
31
36
38
39
40VOID
42{
43 MIXERLINEW mxln;
44 MIXERCONTROLW mxc;
45 MIXERLINECONTROLSW mxlctrl;
46
47 if (pGlobalData->hMixer == NULL)
48 return;
49
50 mxln.cbStruct = sizeof(MIXERLINEW);
52
55 return;
56
57 mxlctrl.cbStruct = sizeof(MIXERLINECONTROLSW);
58 mxlctrl.dwLineID = mxln.dwLineID;
60 mxlctrl.cControls = 1;
61 mxlctrl.cbmxctrl = sizeof(MIXERCONTROLW);
62 mxlctrl.pamxctrl = &mxc;
63
66 return;
67
68 pGlobalData->muteControlID = mxc.dwControlID;
69}
70
71
72VOID
74{
77
78 if (pGlobalData->hMixer == NULL)
79 return;
80
81 mxcd.cbStruct = sizeof(MIXERCONTROLDETAILS);
82 mxcd.dwControlID = pGlobalData->muteControlID;
83 mxcd.cChannels = 1;
84 mxcd.cMultipleItems = 0;
86 mxcd.paDetails = &mxcdMute;
87
90 return;
91
92 pGlobalData->muteVal = mxcdMute.fValue;
93}
94
95
96VOID
98{
101
102 mxcd.cbStruct = sizeof(MIXERCONTROLDETAILS);
103 mxcd.dwControlID = pGlobalData->muteControlID;
104 mxcd.cChannels = 1;
105 mxcd.cMultipleItems = 0;
107 mxcd.paDetails = &mxcdMute;
108
109 mxcdMute.fValue = !pGlobalData->muteVal;
112 return;
113
114 pGlobalData->muteVal = mxcdMute.fValue;
115}
116
117
118VOID
120{
121 MIXERLINEW mxln;
122 MIXERCONTROLW mxc;
124
125 if (pGlobalData->hMixer == NULL)
126 return;
127
128 mxln.cbStruct = sizeof(MIXERLINEW);
132 return;
133
134 pGlobalData->volumeChannels = mxln.cChannels;
135
136 mxlc.cbStruct = sizeof(MIXERLINECONTROLSW);
137 mxlc.dwLineID = mxln.dwLineID;
139 mxlc.cControls = 1;
140 mxlc.cbmxctrl = sizeof(MIXERCONTROLW);
141 mxlc.pamxctrl = &mxc;
144 return;
145
146 pGlobalData->volumeMinimum = mxc.Bounds.dwMinimum;
147 pGlobalData->volumeMaximum = mxc.Bounds.dwMaximum;
148 pGlobalData->volumeControlID = mxc.dwControlID;
149 pGlobalData->volumeStep = (pGlobalData->volumeMaximum - pGlobalData->volumeMinimum) / (VOLUME_MAX - VOLUME_MIN);
150
152 0,
154 if (pGlobalData->volumeInitialValues == NULL)
155 return;
156
158 0,
160 if (pGlobalData->volumePreviousValues == NULL)
161 return;
162
164 0,
166 if (pGlobalData->volumeCurrentValues == NULL)
167 return;
168}
169
170
171VOID
173 PGLOBAL_DATA pGlobalData,
174 BOOL bInit)
175{
177 DWORD i;
178
179 if (pGlobalData->hMixer == NULL)
180 return;
181
182 mxcd.cbStruct = sizeof(MIXERCONTROLDETAILS);
183 mxcd.dwControlID = pGlobalData->volumeControlID;
184 mxcd.cChannels = pGlobalData->volumeChannels;
185 mxcd.cMultipleItems = 0;
187 mxcd.paDetails = pGlobalData->volumePreviousValues;
188
191 return;
192
193 pGlobalData->maxVolume = 0;
194 for (i = 0; i < pGlobalData->volumeChannels; i++)
195 {
196 pGlobalData->volumeCurrentValues[i].dwValue = pGlobalData->volumePreviousValues[i].dwValue;
197
198 if (pGlobalData->volumePreviousValues[i].dwValue > pGlobalData->maxVolume)
199 pGlobalData->maxVolume = pGlobalData->volumePreviousValues[i].dwValue;
200
201 if (bInit)
202 pGlobalData->volumeInitialValues[i].dwValue = pGlobalData->volumeCurrentValues[i].dwValue;
203 }
204}
205
206
207VOID
209 DWORD dwPosition)
210{
212 DWORD dwVolume, i;
213
214 if (pGlobalData->hMixer == NULL)
215 return;
216
217 if (dwPosition == VOLUME_MIN)
218 dwVolume = pGlobalData->volumeMinimum;
219 else if (dwPosition == VOLUME_MAX)
220 dwVolume = pGlobalData->volumeMaximum;
221 else
222 dwVolume = (dwPosition * pGlobalData->volumeStep) + pGlobalData->volumeMinimum;
223
224 for (i = 0; i < pGlobalData->volumeChannels; i++)
225 {
226 if (pGlobalData->volumePreviousValues[i].dwValue == pGlobalData->maxVolume)
227 {
228 pGlobalData->volumeCurrentValues[i].dwValue = dwVolume;
229 }
230 else
231 {
232 pGlobalData->volumeCurrentValues[i].dwValue =
233 pGlobalData->volumePreviousValues[i].dwValue * dwVolume / pGlobalData->maxVolume;
234 }
235 }
236
237 mxcd.cbStruct = sizeof(MIXERCONTROLDETAILS);
238 mxcd.dwControlID = pGlobalData->volumeControlID;
239 mxcd.cChannels = pGlobalData->volumeChannels;
240 mxcd.cMultipleItems = 0;
242 mxcd.paDetails = pGlobalData->volumeCurrentValues;
243
246 return;
247}
248
249
250static
251VOID
253 PGLOBAL_DATA pGlobalData)
254{
256
257 if (pGlobalData->hMixer == NULL)
258 return;
259
260 mxcd.cbStruct = sizeof(MIXERCONTROLDETAILS);
261 mxcd.dwControlID = pGlobalData->volumeControlID;
262 mxcd.cChannels = pGlobalData->volumeChannels;
263 mxcd.cMultipleItems = 0;
265 mxcd.paDetails = pGlobalData->volumeInitialValues;
266
267 mixerSetControlDetails((HMIXEROBJ)pGlobalData->hMixer,
268 &mxcd,
270}
271
272
273static
274VOID
276{
277 HWND hwndTaskBar;
278
279 hwndTaskBar = FindWindowW(L"SystemTray_Main", NULL);
280 if (hwndTaskBar == NULL)
281 return;
282
283 SendMessageW(hwndTaskBar, WM_USER + 220, 4, bEnabled);
284}
285
286static
287BOOL
289{
290 HWND hwndTaskBar;
291
292 hwndTaskBar = FindWindowW(L"SystemTray_Main", NULL);
293 if (hwndTaskBar == NULL)
294 {
295 return FALSE;
296 }
297
298 return (BOOL)SendMessageW(hwndTaskBar, WM_USER + 221, 4, 0);
299}
300
301VOID
303{
304 UINT NumMixers;
305 MIXERCAPSW mxc;
306 WCHAR szNoDevices[256];
307
308 LoadStringW(hApplet, IDS_NO_DEVICES, szNoDevices, _countof(szNoDevices));
309
313
314 NumMixers = mixerGetNumDevs();
315 if (!NumMixers)
316 {
326 SetDlgItemTextW(hwndDlg, IDC_DEVICE_NAME, szNoDevices);
327 return;
328 }
329
330 if (mixerOpen(&pGlobalData->hMixer, 0, PtrToUlong(hwndDlg), 0, MIXER_OBJECTF_MIXER | CALLBACK_WINDOW) != MMSYSERR_NOERROR)
331 {
332 MessageBoxW(hwndDlg, L"Cannot open mixer", NULL, MB_OK);
333 return;
334 }
335
336 ZeroMemory(&mxc, sizeof(MIXERCAPSW));
337 if (mixerGetDevCapsW(PtrToUint(pGlobalData->hMixer), &mxc, sizeof(MIXERCAPSW)) != MMSYSERR_NOERROR)
338 {
339 MessageBoxW(hwndDlg, L"mixerGetDevCaps failed", NULL, MB_OK);
340 return;
341 }
342
343 CheckDlgButton(hwndDlg,
346
347 GetMuteControl(pGlobalData);
348 GetMuteState(pGlobalData);
349 if (pGlobalData->muteVal)
350 {
353 }
354 else
355 {
358 }
359
360 GetVolumeControl(pGlobalData);
361 GetVolumeValue(pGlobalData, TRUE);
362
364 SendDlgItemMessageW(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETPOS, (WPARAM)TRUE, (LPARAM)(pGlobalData->maxVolume - pGlobalData->volumeMinimum) / pGlobalData->volumeStep);
365}
366
367VOID
369{
370 BOOL bShowIcon;
371
372 bShowIcon = (IsDlgButtonChecked(hwndDlg, IDC_ICON_IN_TASKBAR) == BST_CHECKED);
373
374 SetSystrayVolumeIconState(bShowIcon);
375}
376
377VOID
379{
380 if ((INT_PTR)ShellExecuteW(NULL, L"open", L"sndvol32.exe", NULL, NULL, SW_SHOWNORMAL) > 32)
381 return;
382 MessageBoxW(hwndDlg, L"Cannot run sndvol32.exe", NULL, MB_OK);
383}
384
385/* Volume property page dialog callback */
386//static INT_PTR CALLBACK
389 UINT uMsg,
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 {
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
426 pGlobalData->hIconUnMuted = LoadImageW(hApplet, MAKEINTRESOURCEW(IDI_CPLICON), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR);
427 pGlobalData->hIconMuted = LoadImageW(hApplet, MAKEINTRESOURCEW(IDI_MUTED_ICON), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR);
428 pGlobalData->hIconNoHW = LoadImageW(hApplet, MAKEINTRESOURCEW(IDI_NO_HW), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR);
429 pGlobalData->hIconSpeakImg = LoadImageW(hApplet,
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 {
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
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
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}
#define PtrToUint(p)
Definition: basetsd.h:85
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HINSTANCE hApplet
Definition: access.c:17
#define IDI_CPLICON
Definition: resource.h:4
#define IDC_ICON_IN_TASKBAR
Definition: resource.h:37
#define IDC_VOLUME_HIGH
Definition: resource.h:35
#define IDC_VOLUME_LOW
Definition: resource.h:34
#define IDC_MUTE_ICON
Definition: resource.h:71
#define IDI_NO_HW
Definition: resource.h:13
#define IDC_VOLUME_TRACKBAR
Definition: resource.h:33
#define IDC_SPEAKIMG
Definition: resource.h:70
#define IDC_DEVICE_NAME
Definition: resource.h:50
#define IDC_ADVANCED_BTN
Definition: resource.h:51
#define IDI_MUTED_ICON
Definition: resource.h:14
#define IDC_ADVANCED2_BTN
Definition: resource.h:54
#define IDC_SPEAKER_VOL_BTN
Definition: resource.h:53
#define IDC_MUTE_CHECKBOX
Definition: resource.h:36
#define IDI_SPEAKIMG
Definition: resource.h:69
#define IDS_NO_DEVICES
Definition: resource.h:91
struct _GLOBAL_DATA GLOBAL_DATA
static BOOL GetSystrayVolumeIconState(VOID)
Definition: volume.c:288
static VOID SetSystrayVolumeIconState(BOOL bEnabled)
Definition: volume.c:275
VOID GetMuteControl(PGLOBAL_DATA pGlobalData)
Definition: volume.c:41
VOID GetVolumeValue(PGLOBAL_DATA pGlobalData, BOOL bInit)
Definition: volume.c:172
VOID GetMuteState(PGLOBAL_DATA pGlobalData)
Definition: volume.c:73
static VOID RestoreVolumeValue(PGLOBAL_DATA pGlobalData)
Definition: volume.c:252
VOID SwitchMuteState(PGLOBAL_DATA pGlobalData)
Definition: volume.c:97
VOID InitVolumeControls(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
Definition: volume.c:302
struct _GLOBAL_DATA * PGLOBAL_DATA
VOID SetVolumeValue(PGLOBAL_DATA pGlobalData, DWORD dwPosition)
Definition: volume.c:208
VOID SaveData(HWND hwndDlg)
Definition: volume.c:368
INT_PTR CALLBACK VolumeDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: volume.c:388
VOID GetVolumeControl(PGLOBAL_DATA pGlobalData)
Definition: volume.c:119
VOID LaunchSoundControl(HWND hwndDlg)
Definition: volume.c:378
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define PtrToUlong(u)
Definition: config.h:107
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint left
Definition: glext.h:7726
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
Definition: glfuncs.h:248
#define VOLUME_PAGESIZE
Definition: mmsys.h:45
#define VOLUME_TICFREQ
Definition: mmsys.h:44
INT_PTR SpeakerVolume(HWND hwndDlg)
#define CALLBACK_WINDOW
Definition: mmsystem.h:148
struct tagMIXERLINECONTROLSW MIXERLINECONTROLSW
#define MIXERLINE_COMPONENTTYPE_DST_SPEAKERS
Definition: mmsystem.h:319
#define MIXER_OBJECTF_MIXER
Definition: mmsystem.h:300
#define MIXER_SETCONTROLDETAILSF_VALUE
Definition: mmsystem.h:415
#define MIXER_GETCONTROLDETAILSF_VALUE
Definition: mmsystem.h:412
#define SND_ALIAS_SYSTEMDEFAULT
Definition: mmsystem.h:175
#define MM_MIXM_CONTROL_CHANGE
Definition: mmsystem.h:83
struct tagMIXERCONTROLW MIXERCONTROLW
#define MIXERCONTROL_CONTROLTYPE_VOLUME
Definition: mmsystem.h:398
#define MIXER_GETLINEINFOF_COMPONENTTYPE
Definition: mmsystem.h:347
#define MM_MIXM_LINE_CHANGE
Definition: mmsystem.h:82
#define SND_ALIAS_ID
Definition: mmsystem.h:161
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
struct tMIXERCONTROLDETAILS_BOOLEAN MIXERCONTROLDETAILS_BOOLEAN
#define SND_ASYNC
Definition: mmsystem.h:154
struct tMIXERCONTROLDETAILS MIXERCONTROLDETAILS
struct tMIXERCONTROLDETAILS_UNSIGNED MIXERCONTROLDETAILS_UNSIGNED
#define MIXER_GETLINECONTROLSF_ONEBYTYPE
Definition: mmsystem.h:410
#define MIXER_OBJECTF_HMIXER
Definition: mmsystem.h:301
struct tagMIXERLINEW MIXERLINEW
#define MIXERCONTROL_CONTROLTYPE_MUTE
Definition: mmsystem.h:384
#define for
Definition: utility.h:88
static HICON
Definition: imagelist.c:84
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
long LONG
Definition: pedump.c:60
BOOL WINAPI PlaySoundW(LPCWSTR pszSoundW, HMODULE hmod, DWORD fdwSound)
Definition: playsound.c:651
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define PSN_APPLY
Definition: prsht.h:117
#define PSN_RESET
Definition: prsht.h:118
#define TB_ENDTRACK
Definition: commctrl.h:2081
#define TBM_SETPAGESIZE
Definition: commctrl.h:2051
#define TB_THUMBPOSITION
Definition: commctrl.h:2077
#define TBM_GETPOS
Definition: commctrl.h:2031
#define TBM_SETRANGE
Definition: commctrl.h:2037
#define TBM_SETPOS
Definition: commctrl.h:2036
#define TBM_SETTICFREQ
Definition: commctrl.h:2050
#define WM_NOTIFY
Definition: richedit.h:61
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2379
#define VOLUME_MAX
Definition: sndvol32.h:19
#define _countof(array)
Definition: sndvol32.h:68
#define VOLUME_MIN
Definition: sndvol32.h:18
HICON hIconMuted
Definition: volume.c:18
DWORD maxVolume
Definition: volume.c:32
DWORD volumeChannels
Definition: volume.c:27
PMIXERCONTROLDETAILS_UNSIGNED volumeCurrentValues
Definition: volume.c:35
HICON hIconNoHW
Definition: volume.c:20
DWORD volumeMaximum
Definition: volume.c:29
LONG muteVal
Definition: volume.c:23
PMIXERCONTROLDETAILS_UNSIGNED volumePreviousValues
Definition: volume.c:34
HMIXER hMixer
Definition: volume.c:17
PMIXERCONTROLDETAILS_UNSIGNED volumeInitialValues
Definition: volume.c:33
HICON hIconSpeakImg
Definition: volume.c:21
HICON hIconUnMuted
Definition: volume.c:19
DWORD volumeMinimum
Definition: volume.c:28
DWORD muteControlID
Definition: volume.c:24
DWORD volumeControlID
Definition: volume.c:26
DWORD volumeStep
Definition: volume.c:30
Definition: inflate.c:139
WCHAR szPname[MAXPNAMELEN]
Definition: mmsystem.h:1226
union tagMIXERCONTROLW::@3047 Bounds
LPMIXERCONTROLW pamxctrl
Definition: mmsystem.h:1350
DWORD dwLineID
Definition: mmsystem.h:1258
DWORD cChannels
Definition: mmsystem.h:1262
DWORD cbStruct
Definition: mmsystem.h:1255
DWORD dwComponentType
Definition: mmsystem.h:1261
LONG right
Definition: windef.h:308
LONG top
Definition: windef.h:307
int32_t INT_PTR
Definition: typedefs.h:64
int32_t INT
Definition: typedefs.h:58
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define HIWORD(l)
Definition: typedefs.h:247
#define ZeroMemory
Definition: winbase.h:1712
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define DI_NORMAL
Definition: wingdi.h:72
UINT WINAPI mixerGetLineControlsW(HMIXEROBJ hmix, LPMIXERLINECONTROLSW lpmlcW, DWORD fdwControls)
Definition: winmm.c:571
UINT WINAPI mixerClose(HMIXER hMix)
Definition: winmm.c:386
UINT WINAPI mixerGetDevCapsW(UINT_PTR uDeviceID, LPMIXERCAPSW lpCaps, UINT uSize)
Definition: winmm.c:314
UINT WINAPI mixerGetControlDetailsW(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdW, DWORD fdwDetails)
Definition: winmm.c:423
UINT WINAPI mixerGetLineInfoW(HMIXEROBJ hmix, LPMIXERLINEW lpmliW, DWORD fdwInfo)
Definition: winmm.c:592
UINT WINAPI mixerGetNumDevs(void)
Definition: winmm.c:280
UINT WINAPI mixerOpen(LPHMIXER lphMix, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
Definition: winmm.c:339
UINT WINAPI mixerSetControlDetails(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcd, DWORD fdwDetails)
Definition: winmm.c:681
#define SW_SHOWNORMAL
Definition: winuser.h:769
struct tagDRAWITEMSTRUCT * LPDRAWITEMSTRUCT
#define DWLP_USER
Definition: winuser.h:871
#define GetWindowLongPtrW
Definition: winuser.h:4828
#define WM_HSCROLL
Definition: winuser.h:1742
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define BST_UNCHECKED
Definition: winuser.h:199
#define IMAGE_ICON
Definition: winuser.h:212
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define WM_COMMAND
Definition: winuser.h:1739
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2186
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define WM_INITDIALOG
Definition: winuser.h:1738
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define STM_SETIMAGE
Definition: winuser.h:2092
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_DRAWITEM
Definition: winuser.h:1644
#define BM_SETCHECK
Definition: winuser.h:1920
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
#define WM_SETTEXT
Definition: winuser.h:1616
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:2011
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define MB_OK
Definition: winuser.h:789
HWND WINAPI GetParent(_In_ HWND)
#define WM_USER
Definition: winuser.h:1894
#define LR_DEFAULTCOLOR
Definition: winuser.h:1086
#define BN_CLICKED
Definition: winuser.h:1924
#define WM_DESTROY
Definition: winuser.h:1608
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SetWindowLongPtrW
Definition: winuser.h:5345
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2036
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185