[MMSYS] Play default sound when the volume trackbar is released.
authorEric Kohl <eric.kohl@reactos.org>
Sun, 13 Jan 2019 13:05:00 +0000 (14:05 +0100)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 13 Jan 2019 13:05:00 +0000 (14:05 +0100)
This works on Windows XP but it might not work on ReactOS because of unimplemented features of PlaySound().

dll/cpl/mmsys/volume.c

index 6374c12..ccaafc3 100644 (file)
@@ -472,7 +472,11 @@ VolumeDlgProc(HWND hwndDlg,
             break;
 
         case WM_NOTIFY:
-            if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
+            if (((LPNMHDR)lParam)->code == (UINT)NM_RELEASEDCAPTURE)
+            {
+                PlaySound((LPCTSTR)SND_ALIAS_SYSTEMDEFAULT, NULL, SND_ALIAS_ID | SND_ASYNC);
+            }
+            else if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
             {
                 SaveData(hwndDlg);
             }