mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 09:00:27 +00:00
[SNDVOL32] Disable the balance trackbar for mono channels.
CORE-15743
This commit is contained in:
parent
008344fd09
commit
45f0d7413c
1 changed files with 27 additions and 12 deletions
|
@ -562,21 +562,36 @@ EnumConnectionsCallback(
|
|||
}
|
||||
}
|
||||
|
||||
/* Set the balance trackbar */
|
||||
wID = (PrefContext->Count + 1) * IDC_LINE_SLIDER_HORZ;
|
||||
|
||||
/* get dialog control */
|
||||
hDlgCtrl = GetDlgItem(PrefContext->MixerWindow->hWnd, wID);
|
||||
|
||||
if (hDlgCtrl != NULL)
|
||||
if (Line->cChannels == 1)
|
||||
{
|
||||
/* check state */
|
||||
LRESULT OldPosition = SendMessageW(hDlgCtrl, TBM_GETPOS, 0, 0);
|
||||
/* Disable the balance trackbar for mono channels */
|
||||
wID = (PrefContext->Count + 1) * IDC_LINE_SLIDER_HORZ;
|
||||
|
||||
if (OldPosition != balancePosition)
|
||||
/* get dialog control */
|
||||
hDlgCtrl = GetDlgItem(PrefContext->MixerWindow->hWnd, wID);
|
||||
if (hDlgCtrl != NULL)
|
||||
{
|
||||
/* update control state */
|
||||
SendMessageW(hDlgCtrl, TBM_SETPOS, (WPARAM)TRUE, balancePosition);
|
||||
EnableWindow(hDlgCtrl, FALSE);
|
||||
}
|
||||
}
|
||||
else if (Line->cChannels == 2)
|
||||
{
|
||||
/* Set the balance trackbar */
|
||||
wID = (PrefContext->Count + 1) * IDC_LINE_SLIDER_HORZ;
|
||||
|
||||
/* get dialog control */
|
||||
hDlgCtrl = GetDlgItem(PrefContext->MixerWindow->hWnd, wID);
|
||||
|
||||
if (hDlgCtrl != NULL)
|
||||
{
|
||||
/* check state */
|
||||
LRESULT OldPosition = SendMessageW(hDlgCtrl, TBM_GETPOS, 0, 0);
|
||||
|
||||
if (OldPosition != balancePosition)
|
||||
{
|
||||
/* update control state */
|
||||
SendMessageW(hDlgCtrl, TBM_SETPOS, (WPARAM)TRUE, balancePosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue