/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Sound Volume Control
- * FILE: subsys/system/sndvol32/dialog.c
+ * FILE: base/applications/sndvol32/dialog.c
* PROGRAMMERS: Johannes Anderwald
*/
default:
/* FIXME */
assert(0);
- ClassName = 0;
+ ClassName = NULL;
}
}
else
/* class name is encoded as string */
ClassName = (LPWSTR)Offset;
- /* adjust offset */
- Offset += wcslen(ClassName) + 1;
+ /* move offset to the end of class string */
+ Offset += wcslen(ClassName);
- /* get offset */
+ /* get window name */
WindowName = (LPWSTR)(Offset + 1);
}
+
+ /* move offset past class type/string */
+ Offset++;
if (DialogItem->id == MAXWORD)
{
if (WindowName != NULL)
{
- /* position offset to start of name */
- Offset++;
-
- /* move offset past name */
- Offset += wcslen((LPWSTR)Offset) + 1;
- }
- else
- {
- /* no name so just adjust offset */
- Offset++;
+ /* move offset past window name */
+ Offset += wcslen(WindowName) + 1;
}
/* check if there is additional data */
}
else
{
- /* add data offset */
+ /* FIXME: Determine whether this should be "Offset += 1 + *Offset" to explicitly skip the data count too. */
+ /* skip past additional data */
Offset += *Offset;
}
SetDlgItemTextW(PrefContext->MixerWindow->hWnd, wID, Line->szName);
/* query controls */
- if (SndMixerQueryControls(Mixer, &ControlCount, Line, &Control) == TRUE)
+ if (SndMixerQueryControls(Mixer, &ControlCount, Line, &Control) != FALSE)
{
/* now go through all controls and update their states */
for(Index = 0; Index < ControlCount; Index++)
/* enumerate controls */
SndMixerEnumConnections(PrefContext->MixerWindow->Mixer, PrefContext->SelectedLine, EnumConnectionsCallback, (PVOID)PrefContext);
- /* get last line seperator */
+ /* get last line separator */
hDlgCtrl = GetDlgItem(PrefContext->MixerWindow->hWnd, IDC_LINE_SEP * PrefContext->Count);
if (hDlgCtrl != NULL)
{
- /* hide last seperator */
+ /* hide last separator */
ShowWindow(hDlgCtrl, SW_HIDE);
}