Author: janderwald
Date: Fri Nov 13 12:42:23 2009
New Revision: 44127
URL:
http://svn.reactos.org/svn/reactos?rev=44127&view=rev
Log:
- Implement updating volume position / mute state after receiving a notification
Modified:
trunk/reactos/dll/cpl/mmsys/volume.c
Modified: trunk/reactos/dll/cpl/mmsys/volume.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/mmsys/volume.c?rev…
==============================================================================
--- trunk/reactos/dll/cpl/mmsys/volume.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/mmsys/volume.c [iso-8859-1] Fri Nov 13 12:42:23 2009
@@ -299,8 +299,32 @@
pGlobalData = (PGLOBAL_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
+
+
switch(uMsg)
{
+ case MM_MIXM_LINE_CHANGE:
+ {
+ GetMuteState(pGlobalData);
+ if (pGlobalData->muteVal)
+ {
+ SendDlgItemMessage(hwndDlg, IDC_MUTE_CHECKBOX, BM_SETCHECK,
(WPARAM)BST_CHECKED, (LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_MUTE_ICON, STM_SETIMAGE, IMAGE_ICON,
(LPARAM)pGlobalData->hIconMuted);
+ }
+ else
+ {
+ SendDlgItemMessage(hwndDlg, IDC_MUTE_CHECKBOX, BM_SETCHECK,
(WPARAM)BST_UNCHECKED, (LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_MUTE_ICON, STM_SETIMAGE, IMAGE_ICON,
(LPARAM)pGlobalData->hIconUnMuted);
+ }
+ break;
+ }
+ case MM_MIXM_CONTROL_CHANGE:
+ {
+ GetVolumeValue(pGlobalData);
+ SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETSEL, (WPARAM)FALSE,
(LPARAM)MAKELONG(pGlobalData->volumeMinimum,
pGlobalData->volumeValue/VOLUME_DIVIDER));
+ SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETPOS, (WPARAM)TRUE,
(LPARAM)pGlobalData->volumeValue/VOLUME_DIVIDER);
+ break;
+ }
case WM_INITDIALOG:
{
pGlobalData = (GLOBAL_DATA*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(GLOBAL_DATA));