https://git.reactos.org/?p=reactos.git;a=commitdiff;h=77e3fbfad5221d0eaac2c…
commit 77e3fbfad5221d0eaac2cbb1f4c3e384ef939ab8
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Feb 24 17:15:13 2019 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Feb 24 17:15:13 2019 +0100
[MMSYS] Volume page: Initialize the volume trackbar before it might be disabled
because the tick marks must be visible on a disabled trackbar.
---
dll/cpl/mmsys/volume.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dll/cpl/mmsys/volume.c b/dll/cpl/mmsys/volume.c
index a64642f862..4c3189bbbe 100644
--- a/dll/cpl/mmsys/volume.c
+++ b/dll/cpl/mmsys/volume.c
@@ -301,6 +301,10 @@ InitVolumeControls(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
LoadString(hApplet, IDS_NO_DEVICES, szNoDevices, _countof(szNoDevices));
+ SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETRANGE, (WPARAM)TRUE,
(LPARAM)MAKELONG(VOLUME_MIN, VOLUME_MAX));
+ SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETTICFREQ, VOLUME_TICFREQ, 0);
+ SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETPAGESIZE, 0,
VOLUME_PAGESIZE);
+
NumMixers = mixerGetNumDevs();
if (!NumMixers)
{
@@ -351,9 +355,6 @@ InitVolumeControls(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
GetVolumeValue(pGlobalData);
SendDlgItemMessage(hwndDlg, IDC_DEVICE_NAME, WM_SETTEXT, 0, (LPARAM)mxc.szPname);
- SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETRANGE, (WPARAM)TRUE,
(LPARAM)MAKELONG(VOLUME_MIN, VOLUME_MAX));
- SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETTICFREQ, VOLUME_TICFREQ, 0);
- SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETPAGESIZE, 0,
VOLUME_PAGESIZE);
SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETPOS, (WPARAM)TRUE,
(LPARAM)(pGlobalData->maxVolume - pGlobalData->volumeMinimum) /
pGlobalData->volumeStep);
}