https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0ec2fd4c3ea9d5139f59e…
commit 0ec2fd4c3ea9d5139f59e3dd9d9921df28be4715
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Jan 13 15:38:06 2019 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Jan 13 15:38:06 2019 +0100
[MMSYS] Fix the main volume trackbar
- Increase the height of the trackbar in order to make it fully visible.
- Remove the selection range code.
- Set a range from 0 to 500 and fix the volume calculations accordingly.
- Set a tick frequency of 50 and a page size of 100.
- Play the default sound on TB_ENDTRACK notifications.
---
dll/cpl/mmsys/lang/bg-BG.rc | 2 +-
dll/cpl/mmsys/lang/cs-CZ.rc | 2 +-
dll/cpl/mmsys/lang/de-DE.rc | 2 +-
dll/cpl/mmsys/lang/el-GR.rc | 2 +-
dll/cpl/mmsys/lang/en-US.rc | 2 +-
dll/cpl/mmsys/lang/es-ES.rc | 2 +-
dll/cpl/mmsys/lang/fr-FR.rc | 2 +-
dll/cpl/mmsys/lang/he-IL.rc | 2 +-
dll/cpl/mmsys/lang/id-ID.rc | 2 +-
dll/cpl/mmsys/lang/it-IT.rc | 2 +-
dll/cpl/mmsys/lang/ja-JP.rc | 2 +-
dll/cpl/mmsys/lang/nl-NL.rc | 2 +-
dll/cpl/mmsys/lang/no-NO.rc | 2 +-
dll/cpl/mmsys/lang/pl-PL.rc | 2 +-
dll/cpl/mmsys/lang/pt-BR.rc | 2 +-
dll/cpl/mmsys/lang/ro-RO.rc | 2 +-
dll/cpl/mmsys/lang/ru-RU.rc | 2 +-
dll/cpl/mmsys/lang/sk-SK.rc | 2 +-
dll/cpl/mmsys/lang/sq-AL.rc | 2 +-
dll/cpl/mmsys/lang/tr-TR.rc | 2 +-
dll/cpl/mmsys/lang/uk-UA.rc | 2 +-
dll/cpl/mmsys/lang/zh-CN.rc | 2 +-
dll/cpl/mmsys/lang/zh-TW.rc | 2 +-
dll/cpl/mmsys/volume.c | 36 ++++++++++++++++--------------------
24 files changed, 39 insertions(+), 43 deletions(-)
diff --git a/dll/cpl/mmsys/lang/bg-BG.rc b/dll/cpl/mmsys/lang/bg-BG.rc
index 82f053f033..68401bf7f2 100644
--- a/dll/cpl/mmsys/lang/bg-BG.rc
+++ b/dll/cpl/mmsys/lang/bg-BG.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Сила на устройството", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Слабо", -1, 62, 66, 30, 17
LTEXT "Силно", -1, 195, 66, 30, 17
AUTOCHECKBOX "За&глушено", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/cs-CZ.rc b/dll/cpl/mmsys/lang/cs-CZ.rc
index e7b6479915..54083af812 100644
--- a/dll/cpl/mmsys/lang/cs-CZ.rc
+++ b/dll/cpl/mmsys/lang/cs-CZ.rc
@@ -14,7 +14,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Hlasitost zařízení", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Nízká", -1, 62, 66, 30, 17
LTEXT "Vysoká", -1, 195, 66, 30, 17
AUTOCHECKBOX "&Ztlumit", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/de-DE.rc b/dll/cpl/mmsys/lang/de-DE.rc
index 28bdb81d28..4aec9627c8 100644
--- a/dll/cpl/mmsys/lang/de-DE.rc
+++ b/dll/cpl/mmsys/lang/de-DE.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Gerätelautstärke", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Niedrig", -1, 62, 66, 30, 17
LTEXT "Hoch", -1, 195, 66, 30, 17
AUTOCHECKBOX "Stu&mm schalten", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/el-GR.rc b/dll/cpl/mmsys/lang/el-GR.rc
index 2886f2ecee..bbb48d7302 100644
--- a/dll/cpl/mmsys/lang/el-GR.rc
+++ b/dll/cpl/mmsys/lang/el-GR.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 20
GROUPBOX "Device volume", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Low", -1, 62, 66, 30, 9
LTEXT "High", -1, 195, 66, 30, 9
AUTOCHECKBOX "&Mute", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/en-US.rc b/dll/cpl/mmsys/lang/en-US.rc
index e6d0407fff..dee8b78851 100644
--- a/dll/cpl/mmsys/lang/en-US.rc
+++ b/dll/cpl/mmsys/lang/en-US.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 20
GROUPBOX "Device volume", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Low", -1, 62, 66, 30, 9
LTEXT "High", -1, 195, 66, 30, 9
AUTOCHECKBOX "&Mute", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/es-ES.rc b/dll/cpl/mmsys/lang/es-ES.rc
index 42d472d12e..e5f2df82f6 100644
--- a/dll/cpl/mmsys/lang/es-ES.rc
+++ b/dll/cpl/mmsys/lang/es-ES.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Volumen del dispositivo ", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Bajo", -1, 62, 66, 30, 17
LTEXT "Alto", -1, 195, 66, 30, 17
AUTOCHECKBOX "&Silencio", IDC_MUTE_CHECKBOX, 30, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/fr-FR.rc b/dll/cpl/mmsys/lang/fr-FR.rc
index c9658ab956..9eb336404f 100644
--- a/dll/cpl/mmsys/lang/fr-FR.rc
+++ b/dll/cpl/mmsys/lang/fr-FR.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Volume du périphérique", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Faible", -1, 62, 66, 30, 17
LTEXT "Élevé", -1, 195, 66, 30, 17
AUTOCHECKBOX "&Muet", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/he-IL.rc b/dll/cpl/mmsys/lang/he-IL.rc
index 70083edb3a..893e207e6b 100644
--- a/dll/cpl/mmsys/lang/he-IL.rc
+++ b/dll/cpl/mmsys/lang/he-IL.rc
@@ -11,7 +11,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 20
GROUPBOX "עוצמת התקן", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "נמוך", -1, 62, 66, 30, 9
LTEXT "גבוה", -1, 195, 66, 30, 9
AUTOCHECKBOX "השתק", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/id-ID.rc b/dll/cpl/mmsys/lang/id-ID.rc
index 7e417647ca..13619732a3 100644
--- a/dll/cpl/mmsys/lang/id-ID.rc
+++ b/dll/cpl/mmsys/lang/id-ID.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 20
GROUPBOX "Device volume", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Low", -1, 62, 66, 30, 9
LTEXT "High", -1, 195, 66, 30, 9
AUTOCHECKBOX "&Mute", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/it-IT.rc b/dll/cpl/mmsys/lang/it-IT.rc
index 388b0b87b3..9ad8e067a2 100644
--- a/dll/cpl/mmsys/lang/it-IT.rc
+++ b/dll/cpl/mmsys/lang/it-IT.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Volume del dispositivo", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Basso", -1, 62, 66, 30, 17
LTEXT "Alto", -1, 195, 66, 30, 17
AUTOCHECKBOX "&Mute", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/ja-JP.rc b/dll/cpl/mmsys/lang/ja-JP.rc
index 6e581bc18f..d7e045dde5 100644
--- a/dll/cpl/mmsys/lang/ja-JP.rc
+++ b/dll/cpl/mmsys/lang/ja-JP.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 20
GROUPBOX "デバイスの音量", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "低", -1, 62, 66, 30, 9
LTEXT "高", -1, 195, 66, 30, 9
AUTOCHECKBOX "ミュート(&M)", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/nl-NL.rc b/dll/cpl/mmsys/lang/nl-NL.rc
index 4c432a9534..a2e5164de0 100644
--- a/dll/cpl/mmsys/lang/nl-NL.rc
+++ b/dll/cpl/mmsys/lang/nl-NL.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Volume", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Laag", -1, 62, 62, 30, 17
LTEXT "Hoog", -1, 195, 62, 30, 17
AUTOCHECKBOX "&Dempen", IDC_MUTE_CHECKBOX, 25, 78, 190, 10
diff --git a/dll/cpl/mmsys/lang/no-NO.rc b/dll/cpl/mmsys/lang/no-NO.rc
index aa381129bc..e89585fba4 100644
--- a/dll/cpl/mmsys/lang/no-NO.rc
+++ b/dll/cpl/mmsys/lang/no-NO.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Enhets volum", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Lavt", -1, 62, 66, 30, 17
LTEXT "Høyt", -1, 195, 66, 30, 17
AUTOCHECKBOX "&Demp", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/pl-PL.rc b/dll/cpl/mmsys/lang/pl-PL.rc
index a1fc6077ac..1388a788e1 100644
--- a/dll/cpl/mmsys/lang/pl-PL.rc
+++ b/dll/cpl/mmsys/lang/pl-PL.rc
@@ -22,7 +22,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Głośność urządzenia", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Mała", -1, 62, 66, 30, 17
LTEXT "Duża", -1, 195, 66, 30, 17
AUTOCHECKBOX "&Wycisz", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/pt-BR.rc b/dll/cpl/mmsys/lang/pt-BR.rc
index b40b26baca..fcd4bea426 100644
--- a/dll/cpl/mmsys/lang/pt-BR.rc
+++ b/dll/cpl/mmsys/lang/pt-BR.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 20
GROUPBOX "Device volume", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Low", -1, 62, 66, 30, 9
LTEXT "High", -1, 195, 66, 30, 9
AUTOCHECKBOX "&Mute", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/ro-RO.rc b/dll/cpl/mmsys/lang/ro-RO.rc
index fde0871fce..97a78fc4a0 100644
--- a/dll/cpl/mmsys/lang/ro-RO.rc
+++ b/dll/cpl/mmsys/lang/ro-RO.rc
@@ -14,7 +14,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Volum", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Redus", -1, 62, 66, 30, 17
LTEXT "Ridicat", -1, 195, 66, 30, 17
AUTOCHECKBOX "A&muțește tot", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/ru-RU.rc b/dll/cpl/mmsys/lang/ru-RU.rc
index 83fd057b68..4a6be2ec09 100644
--- a/dll/cpl/mmsys/lang/ru-RU.rc
+++ b/dll/cpl/mmsys/lang/ru-RU.rc
@@ -9,7 +9,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 19
GROUPBOX "Громкость микшера", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "ниже", -1, 62, 66, 30, 9
LTEXT "выше", -1, 195, 66, 30, 9
AUTOCHECKBOX "В&ыключить звук", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/sk-SK.rc b/dll/cpl/mmsys/lang/sk-SK.rc
index 672dcf51dc..f843795c1b 100644
--- a/dll/cpl/mmsys/lang/sk-SK.rc
+++ b/dll/cpl/mmsys/lang/sk-SK.rc
@@ -14,7 +14,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Hlasitosť zariadenia", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "nízka", -1, 62, 66, 30, 17
LTEXT "vysoká", -1, 195, 66, 30, 17
AUTOCHECKBOX "S&tlmiť", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/sq-AL.rc b/dll/cpl/mmsys/lang/sq-AL.rc
index 23fcc1c2f7..981d5819eb 100644
--- a/dll/cpl/mmsys/lang/sq-AL.rc
+++ b/dll/cpl/mmsys/lang/sq-AL.rc
@@ -13,7 +13,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 20
GROUPBOX "Volumi Pjesës", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Poshtë", -1, 62, 66, 30, 9
LTEXT "Lart", -1, 195, 66, 30, 9
AUTOCHECKBOX "&Mute", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/tr-TR.rc b/dll/cpl/mmsys/lang/tr-TR.rc
index 4442122911..7c8a9b4dae 100644
--- a/dll/cpl/mmsys/lang/tr-TR.rc
+++ b/dll/cpl/mmsys/lang/tr-TR.rc
@@ -11,7 +11,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 20
GROUPBOX "Aygıt Ses Düzeyi", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "Düşük", -1, 62, 66, 30, 9
LTEXT "Yüksek", -1, 195, 66, 30, 9
AUTOCHECKBOX "&Sessiz", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/uk-UA.rc b/dll/cpl/mmsys/lang/uk-UA.rc
index 143c3faf95..cdab3fb8db 100644
--- a/dll/cpl/mmsys/lang/uk-UA.rc
+++ b/dll/cpl/mmsys/lang/uk-UA.rc
@@ -17,7 +17,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "Гучність мікшера", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "нижче", -1, 62, 66, 30, 17
LTEXT "вище", -1, 195, 66, 30, 17
AUTOCHECKBOX "&Вимкнути звук", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/zh-CN.rc b/dll/cpl/mmsys/lang/zh-CN.rc
index 88890b7a86..7fb7a74bea 100644
--- a/dll/cpl/mmsys/lang/zh-CN.rc
+++ b/dll/cpl/mmsys/lang/zh-CN.rc
@@ -17,7 +17,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "设备音量", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "低", -1, 62, 66, 30, 17
LTEXT "高", -1, 195, 66, 30, 17
AUTOCHECKBOX "静音(&M)", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/lang/zh-TW.rc b/dll/cpl/mmsys/lang/zh-TW.rc
index 8f238d7284..1e3a06e696 100644
--- a/dll/cpl/mmsys/lang/zh-TW.rc
+++ b/dll/cpl/mmsys/lang/zh-TW.rc
@@ -15,7 +15,7 @@ BEGIN
LTEXT "", IDC_DEVICE_NAME, 40, 10, 194, 36
GROUPBOX "裝置音量", -1, 7, 30, 230, 100, WS_GROUP
CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE, 17,
45, 32, 32
- CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14
+ CONTROL "", IDC_VOLUME_TRACKBAR, "msctls_trackbar32",
TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 20
LTEXT "低", -1, 62, 66, 30, 17
LTEXT "高", -1, 195, 66, 30, 17
AUTOCHECKBOX "靜音(&M)", IDC_MUTE_CHECKBOX, 50, 78, 140, 10
diff --git a/dll/cpl/mmsys/volume.c b/dll/cpl/mmsys/volume.c
index ccaafc36ea..98f1d0150d 100644
--- a/dll/cpl/mmsys/volume.c
+++ b/dll/cpl/mmsys/volume.c
@@ -11,7 +11,10 @@
#include <shellapi.h>
-#define VOLUME_DIVIDER 0xFFF
+#define VOLUME_MIN 0
+#define VOLUME_MAX 500
+#define VOLUME_TICFREQ 50
+#define VOLUME_PAGESIZE 100
typedef struct _IMGINFO
{
@@ -35,7 +38,7 @@ typedef struct _GLOBAL_DATA
DWORD volumeMinimum;
DWORD volumeMaximum;
DWORD volumeValue;
-
+ DWORD volumeStep;
} GLOBAL_DATA, *PGLOBAL_DATA;
@@ -168,6 +171,7 @@ GetVolumeControl(PGLOBAL_DATA pGlobalData)
pGlobalData->volumeMinimum = mxc.Bounds.dwMinimum;
pGlobalData->volumeMaximum = mxc.Bounds.dwMaximum;
pGlobalData->volumeControlID = mxc.dwControlID;
+ pGlobalData->volumeStep = (pGlobalData->volumeMaximum -
pGlobalData->volumeMinimum) / (VOLUME_MAX - VOLUME_MIN);
}
@@ -303,12 +307,10 @@ 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(pGlobalData->volumeMinimum,
pGlobalData->volumeMaximum/VOLUME_DIVIDER));
- SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETPAGESIZE, (WPARAM)FALSE,
(LPARAM)1);
- 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);
+ 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->volumeValue - pGlobalData->volumeMinimum) /
pGlobalData->volumeStep);
}
VOID
@@ -344,8 +346,6 @@ VolumeDlgProc(HWND hwndDlg,
pGlobalData = (PGLOBAL_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
-
-
switch(uMsg)
{
case MM_MIXM_LINE_CHANGE:
@@ -366,8 +366,7 @@ VolumeDlgProc(HWND hwndDlg,
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);
+ SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETPOS, (WPARAM)TRUE,
(LPARAM)(pGlobalData->volumeValue - pGlobalData->volumeMinimum) /
pGlobalData->volumeStep);
break;
}
case WM_INITDIALOG:
@@ -455,10 +454,11 @@ VolumeDlgProc(HWND hwndDlg,
HWND hVolumeTrackbar = GetDlgItem(hwndDlg, IDC_VOLUME_TRACKBAR);
if (hVolumeTrackbar == (HWND)lParam)
{
- pGlobalData->volumeValue = (DWORD)SendDlgItemMessage(hwndDlg,
IDC_VOLUME_TRACKBAR, TBM_GETPOS, 0, 0)*VOLUME_DIVIDER;
+ pGlobalData->volumeValue = ((DWORD)SendDlgItemMessage(hwndDlg,
IDC_VOLUME_TRACKBAR, TBM_GETPOS, 0, 0) * pGlobalData->volumeStep) +
pGlobalData->volumeMinimum;
SetVolumeValue(pGlobalData);
- SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETSEL,
(WPARAM)TRUE,
- (LPARAM)MAKELONG(pGlobalData->volumeMinimum,
pGlobalData->volumeValue/VOLUME_DIVIDER));
+
+ if (LOWORD(wParam) == TB_ENDTRACK)
+ PlaySound((LPCTSTR)SND_ALIAS_SYSTEMDEFAULT, NULL, SND_ALIAS_ID |
SND_ASYNC);
}
break;
}
@@ -472,11 +472,7 @@ VolumeDlgProc(HWND hwndDlg,
break;
case WM_NOTIFY:
- 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)
+ if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
{
SaveData(hwndDlg);
}