https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5cf2a78473ccfda6ee01c…
commit 5cf2a78473ccfda6ee01c602bbea40513fa63837
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sat Jan 12 22:11:37 2019 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Jan 13 10:37:21 2019 +0100
[MMSYS] Replace the sound event list ListView by a TreeView.
CORE-15584
---
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/sounds.c | 162 +++++++++++++++++++++++---------------------
24 files changed, 107 insertions(+), 101 deletions(-)
diff --git a/dll/cpl/mmsys/lang/bg-BG.rc b/dll/cpl/mmsys/lang/bg-BG.rc
index e48b5f0993..82f053f033 100644
--- a/dll/cpl/mmsys/lang/bg-BG.rc
+++ b/dll/cpl/mmsys/lang/bg-BG.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "Из&триване", IDC_DELETE_BTN, 186, 70, 52, 15
LTEXT "За да промените звуците, цъкнете на събитие в списъка и му задайте звук.
Можете да запишете промените като нова звукова наредба.", -1, 8, 90, 230, 40
LTEXT "&Събития:", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Звуци", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/cs-CZ.rc b/dll/cpl/mmsys/lang/cs-CZ.rc
index eea5eb7eee..e7b6479915 100644
--- a/dll/cpl/mmsys/lang/cs-CZ.rc
+++ b/dll/cpl/mmsys/lang/cs-CZ.rc
@@ -39,7 +39,7 @@ BEGIN
PUSHBUTTON "&Smazat", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Zvuky lze měnit kliknutím na programovou událost v následujícím seznamu a
vybráním zvuku, který má být přehrán. Změny lze uložit jako nové zvukové schéma.",
-1, 8, 90, 230, 40
LTEXT "&Události programů:", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Zvuky:", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/de-DE.rc b/dll/cpl/mmsys/lang/de-DE.rc
index ca2d7d0484..28bdb81d28 100644
--- a/dll/cpl/mmsys/lang/de-DE.rc
+++ b/dll/cpl/mmsys/lang/de-DE.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "&Löschen", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Um Klänge zu ändern, klicken Sie auf ein Programmereignis in der
folgenden Liste und wählen Sie einen Klang aus. Sie können Änderungen als neue
Klangschemata speichern.", -1, 8, 90, 230, 40
LTEXT "&Programmereignisse:", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Klänge:", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 135, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 148, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/el-GR.rc b/dll/cpl/mmsys/lang/el-GR.rc
index d9a2f50591..2886f2ecee 100644
--- a/dll/cpl/mmsys/lang/el-GR.rc
+++ b/dll/cpl/mmsys/lang/el-GR.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "&Delete", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "To change sounds, click a program event in the following list and then
select a sound to apply. You can save the changes as a new sound scheme.", -1, 8, 90,
230, 27
LTEXT "&Program events:", -1, 8, 118, 150, 9
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Sounds:", IDC_TEXT_SOUND, 8, 194, 80, 9, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/en-US.rc b/dll/cpl/mmsys/lang/en-US.rc
index c689dd5198..e6d0407fff 100644
--- a/dll/cpl/mmsys/lang/en-US.rc
+++ b/dll/cpl/mmsys/lang/en-US.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "&Delete", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "To change sounds, click a program event in the following list and then
select a sound to apply. You can save the changes as a new sound scheme.", -1, 8, 90,
230, 27
LTEXT "&Program events:", -1, 8, 118, 150, 9
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Sounds:", IDC_TEXT_SOUND, 8, 194, 80, 9, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/es-ES.rc b/dll/cpl/mmsys/lang/es-ES.rc
index 668d2caf8e..42d472d12e 100644
--- a/dll/cpl/mmsys/lang/es-ES.rc
+++ b/dll/cpl/mmsys/lang/es-ES.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "&Eliminar", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Para cambiar los sonidos, haga clic en un suceso de la siguiente lista y
elija un sonido que desea utilizar. Puede guardar los cambios como una combinación nueva
de sonidos.", -1, 8, 90, 230, 40
LTEXT "&Sucesos de programa:", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "S&onidos:", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/fr-FR.rc b/dll/cpl/mmsys/lang/fr-FR.rc
index 9206bf67cb..c9658ab956 100644
--- a/dll/cpl/mmsys/lang/fr-FR.rc
+++ b/dll/cpl/mmsys/lang/fr-FR.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "Supprimer", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Pour changer les sons, cliquez sur un évènement de programme dans la
liste suivante, puis sélectionnez un son à appliquer. Vous pouvez enregistrer les
changements en tant que nouveau schéma son.", -1, 8, 90, 230, 40
LTEXT "Évènements des programmes :", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Sons :", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/he-IL.rc b/dll/cpl/mmsys/lang/he-IL.rc
index 268b1b2927..70083edb3a 100644
--- a/dll/cpl/mmsys/lang/he-IL.rc
+++ b/dll/cpl/mmsys/lang/he-IL.rc
@@ -36,7 +36,7 @@ BEGIN
PUSHBUTTON "מחק", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "To change sounds, click a program event in the following list and then
select a sound to apply. You can save the changes as a new sound scheme.", -1, 8, 90,
230, 27
LTEXT "אירועי תכניות:", -1, 8, 118, 150, 9
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "צלילים:", IDC_TEXT_SOUND, 8, 194, 80, 9, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/id-ID.rc b/dll/cpl/mmsys/lang/id-ID.rc
index 9fc372717e..7e417647ca 100644
--- a/dll/cpl/mmsys/lang/id-ID.rc
+++ b/dll/cpl/mmsys/lang/id-ID.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "&Delete", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "To change sounds, click a program event in the following list and then
select a sound to apply. You can save the changes as a new sound scheme.", -1, 8, 90,
230, 27
LTEXT "&Program events:", -1, 8, 118, 150, 9
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Sounds:", IDC_TEXT_SOUND, 8, 194, 80, 9, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/it-IT.rc b/dll/cpl/mmsys/lang/it-IT.rc
index fc3e064ef8..388b0b87b3 100644
--- a/dll/cpl/mmsys/lang/it-IT.rc
+++ b/dll/cpl/mmsys/lang/it-IT.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "&Cancella", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Per cambiare i suoni, cliccare un evento nella lista seguente e poi
scegliere il suono da usare. Potete salvare le modifiche in un nuovo schema di
suoni.", -1, 8, 90, 230, 40
LTEXT "&Eventi:", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Suoni:", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/ja-JP.rc b/dll/cpl/mmsys/lang/ja-JP.rc
index 8af0418cc1..6e581bc18f 100644
--- a/dll/cpl/mmsys/lang/ja-JP.rc
+++ b/dll/cpl/mmsys/lang/ja-JP.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "削除(&D)", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "音声を変更するには、以下のリストからプログラム
イベントをクリックして適用する音声を選択して下さい。変更を新しい音声スキームとして保存できます。", -1, 8, 90, 230, 27
LTEXT "プログラム イベント(&P):", -1, 8, 118, 150, 9
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "音声(&S):", IDC_TEXT_SOUND, 8, 194, 80, 9, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/nl-NL.rc b/dll/cpl/mmsys/lang/nl-NL.rc
index 53391686be..4c432a9534 100644
--- a/dll/cpl/mmsys/lang/nl-NL.rc
+++ b/dll/cpl/mmsys/lang/nl-NL.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "&Verwijderen", IDC_DELETE_BTN, 173, 70, 65, 15
LTEXT "Klik als u het geluid van een programmagebeurtenis wilt wijzigen op de
gebeurtenis in de onderstaande lijst en slecteer eeen geluid. U kunt de wijzigingen in een
nieuw schema opslaan.", -1, 8, 90, 230, 40
LTEXT "&Programmagebeurtenissen:", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 132,
230, 58, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Geluiden:", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/no-NO.rc b/dll/cpl/mmsys/lang/no-NO.rc
index bdfd1bfb6c..aa381129bc 100644
--- a/dll/cpl/mmsys/lang/no-NO.rc
+++ b/dll/cpl/mmsys/lang/no-NO.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "&Slett", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Hvis du vil endre lyder, klikker du på en programhendelse i listen
nedenfor, og velger deretter en lyd som skal brukes. Du kan lagre endringer som et nytt
lydoppsett.", -1, 8, 90, 230, 40
LTEXT "&Programhendelser:", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Lyder:", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/pl-PL.rc b/dll/cpl/mmsys/lang/pl-PL.rc
index 72d2c828b2..a1fc6077ac 100644
--- a/dll/cpl/mmsys/lang/pl-PL.rc
+++ b/dll/cpl/mmsys/lang/pl-PL.rc
@@ -47,7 +47,7 @@ BEGIN
PUSHBUTTON "U&suń", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Aby zmienić dźwięk, kliknij na zdarzenie z listy poniżej a następnie
wybierz dźwięk. Zmiany możesz zapisać w nowym lub obecnym schemacie dźwiękowym.", -1,
8, 90, 230, 40
LTEXT "&Zdarzenia:", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Dźwięki:", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/pt-BR.rc b/dll/cpl/mmsys/lang/pt-BR.rc
index ecc106b266..b40b26baca 100644
--- a/dll/cpl/mmsys/lang/pt-BR.rc
+++ b/dll/cpl/mmsys/lang/pt-BR.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "&Delete", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "To change sounds, click a program event in the following list and then
select a sound to apply. You can save the changes as a new sound scheme.", -1, 8, 90,
230, 27
LTEXT "&Program events:", -1, 8, 118, 150, 9
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Sounds:", IDC_TEXT_SOUND, 8, 194, 80, 9, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/ro-RO.rc b/dll/cpl/mmsys/lang/ro-RO.rc
index 1a8dc81fa2..fde0871fce 100644
--- a/dll/cpl/mmsys/lang/ro-RO.rc
+++ b/dll/cpl/mmsys/lang/ro-RO.rc
@@ -39,7 +39,7 @@ BEGIN
PUSHBUTTON "Șt&erge", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Pentru a schimba sunetele, selectați un eveniment din lista de mai jos,
apoi alegeți sunetul corespunzător care va fi emis. Modificările pot fi păstrate într-o
nouă colecție de sunete.", -1, 8, 90, 230, 40
LTEXT "E&venimente:", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "S&unete:", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/ru-RU.rc b/dll/cpl/mmsys/lang/ru-RU.rc
index df27b624c5..83fd057b68 100644
--- a/dll/cpl/mmsys/lang/ru-RU.rc
+++ b/dll/cpl/mmsys/lang/ru-RU.rc
@@ -34,7 +34,7 @@ BEGIN
PUSHBUTTON "&Удалить", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Чтобы изменить звуковое сопровождение, щелкните на событии в списке и
выберите нужный звук. Изменения можно сохранить как новую звуковую схему.", -1, 8,
90, 230, 28
LTEXT "Программные &события:", -1, 8, 118, 150, 9
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Звуки:", IDC_TEXT_SOUND, 8, 194, 80, 9, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/sk-SK.rc b/dll/cpl/mmsys/lang/sk-SK.rc
index 4276c4c0b0..672dcf51dc 100644
--- a/dll/cpl/mmsys/lang/sk-SK.rc
+++ b/dll/cpl/mmsys/lang/sk-SK.rc
@@ -39,7 +39,7 @@ BEGIN
PUSHBUTTON "O&dstrániť", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "To change sounds, click a program event in the following list and then
select a sound to apply. You can save the changes as a new sound scheme.", -1, 8, 90,
230, 40
LTEXT "&Udalosti programov:", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Zvuky:", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/sq-AL.rc b/dll/cpl/mmsys/lang/sq-AL.rc
index f18054667e..23fcc1c2f7 100644
--- a/dll/cpl/mmsys/lang/sq-AL.rc
+++ b/dll/cpl/mmsys/lang/sq-AL.rc
@@ -38,7 +38,7 @@ BEGIN
PUSHBUTTON "&Fshi", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Për të ndryshuar zërin, klikoni një ngjarje programi në listën e
mëposhtme dhe pastaj përzgjidhni një tingull për të aplikuar. Ju mund të ruani ndryshimet
si një skemë të re.", -1, 8, 90, 230, 27
LTEXT "Evente &Programi:", -1, 8, 118, 150, 9
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Zëri:", IDC_TEXT_SOUND, 8, 194, 80, 9, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/tr-TR.rc b/dll/cpl/mmsys/lang/tr-TR.rc
index e07876448b..4442122911 100644
--- a/dll/cpl/mmsys/lang/tr-TR.rc
+++ b/dll/cpl/mmsys/lang/tr-TR.rc
@@ -36,7 +36,7 @@ BEGIN
PUSHBUTTON "S&il", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Sesleri değiştirmek için aşağıdaki dizelgede bir izlence olayına
tıklayınız, sonra uygulamak için bir ses seçiniz. Değişiklikleri yeni bir ses düzeni
olarak saklayabilirsiniz.", -1, 8, 90, 230, 27
LTEXT "İ&zlence Olayları:", -1, 8, 118, 150, 9
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "S&esler:", IDC_TEXT_SOUND, 8, 194, 80, 9, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/uk-UA.rc b/dll/cpl/mmsys/lang/uk-UA.rc
index 61067d326f..143c3faf95 100644
--- a/dll/cpl/mmsys/lang/uk-UA.rc
+++ b/dll/cpl/mmsys/lang/uk-UA.rc
@@ -42,7 +42,7 @@ BEGIN
PUSHBUTTON "В&идалити", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "Щоб змінити звуковий супровід, клацніть подію у списку та виберіть
потрібний звук. Зміни можна зберегти як нову звукову схему.", -1, 8, 90, 230, 40
LTEXT "&Програмні події:", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "&Звуки:", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/zh-CN.rc b/dll/cpl/mmsys/lang/zh-CN.rc
index 1e828a4cfb..88890b7a86 100644
--- a/dll/cpl/mmsys/lang/zh-CN.rc
+++ b/dll/cpl/mmsys/lang/zh-CN.rc
@@ -42,7 +42,7 @@ BEGIN
PUSHBUTTON "删除(&D)", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "要改变声音,请单击下列表中的程序事件然后选择声音。您可将更改保存为新声音方案。", -1, 8, 90, 230, 40
LTEXT "程序事件(&P):", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "声音(&S):", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/lang/zh-TW.rc b/dll/cpl/mmsys/lang/zh-TW.rc
index cff8ce3eb8..8f238d7284 100644
--- a/dll/cpl/mmsys/lang/zh-TW.rc
+++ b/dll/cpl/mmsys/lang/zh-TW.rc
@@ -40,7 +40,7 @@ BEGIN
PUSHBUTTON "刪除(&D)", IDC_DELETE_BTN, 188, 70, 50, 15
LTEXT "要改變聲音,請單擊下列表中的程式事件然後選擇聲音。您可將更改儲存為新聲音方案。", -1, 8, 90, 230, 40
LTEXT "程式事件(&P):", -1, 8, 118, 150, 17
- CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130,
230, 60, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_SCHEME_LIST, "SysTreeView32",
TVS_DISABLEDRAGDROP| TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE| WS_BORDER | WS_TABSTOP, 8,
130, 230, 60
LTEXT "聲音(&S):", IDC_TEXT_SOUND, 8, 194, 80, 17, WS_DISABLED
COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "", IDC_PLAY_SOUND, 168, 205, 15, 15, WS_DISABLED | BS_ICON
diff --git a/dll/cpl/mmsys/sounds.c b/dll/cpl/mmsys/sounds.c
index a4e6feadf5..4976e2322f 100644
--- a/dll/cpl/mmsys/sounds.c
+++ b/dll/cpl/mmsys/sounds.c
@@ -812,11 +812,11 @@ ShowSoundScheme(HWND hwndDlg)
LRESULT lIndex;
PSOUND_SCHEME_CONTEXT pScheme;
PAPP_MAP pAppMap;
- LV_ITEM listItem;
- LV_COLUMN dummy;
+ PLABEL_MAP pLabelMap;
HWND hDlgCtrl, hList;
- RECT rect;
- int ItemIndex;
+ TVINSERTSTRUCT tvItem;
+ HTREEITEM hTreeItem;
+
hDlgCtrl = GetDlgItem(hwndDlg, IDC_SOUND_SCHEME);
hList = GetDlgItem(hwndDlg, IDC_SCHEME_LIST);
@@ -835,29 +835,35 @@ ShowSoundScheme(HWND hwndDlg)
_tcscpy(szDefault, pScheme->szName);
- /* add column for app */
- GetClientRect(hList, &rect);
- ZeroMemory(&dummy, sizeof(dummy));
- dummy.mask = LVCF_WIDTH;
- dummy.iSubItem = 0;
- dummy.cx = rect.right - rect.left - GetSystemMetrics(SM_CXVSCROLL);
- (void)ListView_InsertColumn(hList, 0, &dummy);
- ItemIndex = 0;
-
pAppMap = s_App;
while (pAppMap)
{
- PLABEL_MAP pLabelMap = pAppMap->LabelMap;
+ ZeroMemory(&tvItem, sizeof(tvItem));
+ tvItem.hParent = TVI_ROOT;
+ tvItem.hInsertAfter = TVI_FIRST;
+
+ tvItem.item.mask = TVIF_STATE | TVIF_TEXT | TVIF_PARAM;
+ tvItem.item.state = TVIS_EXPANDED;
+ tvItem.item.stateMask = TVIS_EXPANDED;
+ tvItem.item.pszText = pAppMap->szDesc;
+ tvItem.item.lParam = (LPARAM)NULL;
+
+ hTreeItem = TreeView_InsertItem(hList, &tvItem);
+
+ pLabelMap = pAppMap->LabelMap;
while (pLabelMap)
{
- ZeroMemory(&listItem, sizeof(listItem));
- listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
- listItem.pszText = pLabelMap->szDesc;
- listItem.lParam = (LPARAM)FindLabelContext(pScheme, pAppMap->szName,
pLabelMap->szName);
- listItem.iItem = ItemIndex;
- listItem.iImage = -1;
- (void)ListView_InsertItem(hList, &listItem);
- ItemIndex++;
+ ZeroMemory(&tvItem, sizeof(tvItem));
+ tvItem.hParent = /*TVI_ROOT;*/ hTreeItem;
+ tvItem.hInsertAfter = TVI_SORT;
+
+ tvItem.item.mask = TVIF_STATE | TVIF_TEXT | TVIF_PARAM;
+ tvItem.item.state = TVIS_EXPANDED;
+ tvItem.item.stateMask = TVIS_EXPANDED;
+ tvItem.item.pszText = pLabelMap->szDesc;
+ tvItem.item.lParam = (LPARAM)FindLabelContext(pScheme, pAppMap->szName,
pLabelMap->szName);
+
+ TreeView_InsertItem(hList, &tvItem);
pLabelMap = pLabelMap->Next;
}
@@ -1036,7 +1042,7 @@ SoundsDlgProc(HWND hwndDlg,
{
if (HIWORD(wParam) == CBN_SELENDOK)
{
- (void)ListView_DeleteAllItems(GetDlgItem(hwndDlg,
IDC_SCHEME_LIST));
+ (void)TreeView_DeleteAllItems(GetDlgItem(hwndDlg,
IDC_SCHEME_LIST));
ShowSoundScheme(hwndDlg);
EnableWindow(GetDlgItem(hwndDlg, IDC_SOUND_LIST), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_TEXT_SOUND), FALSE);
@@ -1051,23 +1057,26 @@ SoundsDlgProc(HWND hwndDlg,
if (HIWORD(wParam) == CBN_SELENDOK)
{
PLABEL_CONTEXT pLabelContext;
- INT SelCount;
- LVITEM item;
+ HTREEITEM hItem;
+ TVITEM item;
LRESULT lIndex;
- SelCount = ListView_GetSelectionMark(GetDlgItem(hwndDlg,
IDC_SCHEME_LIST));
- if (SelCount == -1)
+
+ hItem = TreeView_GetSelection(GetDlgItem(hwndDlg,
IDC_SCHEME_LIST));
+ if (hItem == NULL)
{
break;
}
+
lIndex = ComboBox_GetCurSel(GetDlgItem(hwndDlg,
IDC_SOUND_LIST));
if (lIndex == CB_ERR)
{
break;
}
+
ZeroMemory(&item, sizeof(item));
- item.mask = LVIF_PARAM;
- item.iItem = SelCount;
- if (ListView_GetItem(GetDlgItem(hwndDlg, IDC_SCHEME_LIST),
&item))
+ item.mask = TVIF_PARAM;
+ item.hItem = hItem;
+ if (TreeView_GetItem(GetDlgItem(hwndDlg, IDC_SCHEME_LIST),
&item))
{
LRESULT lResult;
pLabelContext = (PLABEL_CONTEXT)item.lParam;
@@ -1107,7 +1116,6 @@ SoundsDlgProc(HWND hwndDlg,
}
case WM_NOTIFY:
{
- LVITEM item;
PLABEL_CONTEXT pLabelContext;
TCHAR * ptr;
@@ -1120,66 +1128,64 @@ SoundsDlgProc(HWND hwndDlg,
ApplyChanges(hwndDlg);
break;
}
- case LVN_ITEMCHANGED:
+ case TVN_SELCHANGED:
{
- LPNMLISTVIEW nm = (LPNMLISTVIEW)lParam;
+ LPNMTREEVIEW nm = (LPNMTREEVIEW)lParam;
+ LRESULT lCount, lIndex, lResult;
- if ((nm->uNewState & LVIS_SELECTED) == 0)
+ pLabelContext = (PLABEL_CONTEXT)nm->itemNew.lParam;
+ if (pLabelContext == NULL)
{
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SOUND_LIST), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TEXT_SOUND), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE_SOUND), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PLAY_SOUND), FALSE);
return FALSE;
}
- ZeroMemory(&item, sizeof(item));
- item.mask = LVIF_PARAM;
- item.iItem = nm->iItem;
- if (ListView_GetItem(GetDlgItem(hwndDlg, IDC_SCHEME_LIST),
&item))
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SOUND_LIST), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TEXT_SOUND), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE_SOUND), TRUE);
+
+ if (_tcslen(pLabelContext->szValue) == 0)
{
- LRESULT lCount, lIndex, lResult;
- pLabelContext = (PLABEL_CONTEXT)item.lParam;
- if (!pLabelContext)
- {
- return FALSE;
- }
- EnableWindow(GetDlgItem(hwndDlg, IDC_SOUND_LIST), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_TEXT_SOUND), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE_SOUND), TRUE);
- if (_tcslen(pLabelContext->szValue) == 0)
- {
- lIndex = ComboBox_SetCurSel(GetDlgItem(hwndDlg,
IDC_SOUND_LIST), 0);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PLAY_SOUND), FALSE);
- break;
+ lIndex = ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_SOUND_LIST),
0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PLAY_SOUND), FALSE);
+ break;
+ }
- }
- EnableWindow(GetDlgItem(hwndDlg, IDC_PLAY_SOUND), TRUE);
- lCount = ComboBox_GetCount(GetDlgItem(hwndDlg, IDC_SOUND_LIST));
- for (lIndex = 0; lIndex < lCount; lIndex++)
- {
- lResult = ComboBox_GetItemData(GetDlgItem(hwndDlg,
IDC_SOUND_LIST), lIndex);
- if (lResult == CB_ERR || lResult == 0)
- continue;
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PLAY_SOUND), TRUE);
- if (!_tcscmp((TCHAR*)lResult, pLabelContext->szValue))
- {
- ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_SOUND_LIST),
lIndex);
- return FALSE;
- }
- }
- ptr = _tcsrchr(pLabelContext->szValue, _T('\\'));
- if (ptr)
- {
- ptr++;
- }
- else
- {
- ptr = pLabelContext->szValue;
- }
- lIndex = ComboBox_AddString(GetDlgItem(hwndDlg, IDC_SOUND_LIST),
ptr);
- if (lIndex != CB_ERR)
+ lCount = ComboBox_GetCount(GetDlgItem(hwndDlg, IDC_SOUND_LIST));
+ for (lIndex = 0; lIndex < lCount; lIndex++)
+ {
+ lResult = ComboBox_GetItemData(GetDlgItem(hwndDlg,
IDC_SOUND_LIST), lIndex);
+ if (lResult == CB_ERR || lResult == 0)
+ continue;
+
+ if (!_tcscmp((TCHAR*)lResult, pLabelContext->szValue))
{
- ComboBox_SetItemData(GetDlgItem(hwndDlg, IDC_SOUND_LIST),
lIndex, _tcsdup(pLabelContext->szValue));
ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_SOUND_LIST),
lIndex);
+ return FALSE;
}
}
+
+ ptr = _tcsrchr(pLabelContext->szValue, _T('\\'));
+ if (ptr)
+ {
+ ptr++;
+ }
+ else
+ {
+ ptr = pLabelContext->szValue;
+ }
+
+ lIndex = ComboBox_AddString(GetDlgItem(hwndDlg, IDC_SOUND_LIST),
ptr);
+ if (lIndex != CB_ERR)
+ {
+ ComboBox_SetItemData(GetDlgItem(hwndDlg, IDC_SOUND_LIST), lIndex,
_tcsdup(pLabelContext->szValue));
+ ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_SOUND_LIST), lIndex);
+ }
break;
}
}