[SNDVOL32] In record mode, rename the 'Mute' autocheckbox to 'Select', turn it into...
[reactos.git] / base / applications / sndvol32 / sndvol32.c
index 9a5578d..64ce3ac 100644 (file)
@@ -1000,16 +1000,28 @@ MainWindowProc(HWND hwnd,
                             /* compute window id of line name static control */
                             CtrlID = LineOffset * IDC_LINE_NAME;
 
-                            /* get line name */
-                            if (GetDlgItemTextW(hwnd, CtrlID, Context.LineName, MIXER_LONG_NAME_CHARS) != 0)
+                            if (Preferences.MixerWindow->Mixer->MixerId == PLAY_MIXER)
+                            {
+                                /* get line name */
+                                if (GetDlgItemTextW(hwnd, CtrlID, Context.LineName, MIXER_LONG_NAME_CHARS) != 0)
+                                {
+                                    /* setup context */
+                                    Context.SliderPos = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0);
+                                    Context.bVertical = FALSE;
+                                    Context.bSwitch = TRUE;
+
+                                    /* set volume */
+                                    SndMixerEnumConnections(Preferences.MixerWindow->Mixer, Preferences.SelectedLine, SetVolumeCallback, (LPVOID)&Context);
+                                }
+                            }
+                            else if (Preferences.MixerWindow->Mixer->MixerId == RECORD_MIXER)
                             {
-                                /* setup context */
-                                Context.SliderPos = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0);
-                                Context.bVertical = FALSE;
-                                Context.bSwitch = TRUE;
+                                UINT i;
 
-                                /* set volume */
-                                SndMixerEnumConnections(Preferences.MixerWindow->Mixer, Preferences.SelectedLine, SetVolumeCallback, (LPVOID)&Context);
+                                for (i = 0; i < Preferences.MixerWindow->DialogCount; i++)
+                                {
+                                    SendDlgItemMessageW(hwnd, (i + 1) * IDC_LINE_SWITCH, BM_SETCHECK, (WPARAM)((i + 1) == LineOffset), 0);
+                                }
                             }
                         }
                         else if (CtrlID % IDC_LINE_ADVANCED == 0)