Author: dgorbachev
Date: Sun Dec 14 14:45:16 2008
New Revision: 38083
URL:
http://svn.reactos.org/svn/reactos?rev=38083&view=rev
Log:
- Use HEAP_ZERO_MEMORY instead of memset().
- Do not crash if no adapter found.
Modified:
trunk/reactos/dll/cpl/desk/desk.c
trunk/reactos/dll/cpl/desk/settings.c
Modified: trunk/reactos/dll/cpl/desk/desk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/desk.c?rev=38…
==============================================================================
--- trunk/reactos/dll/cpl/desk/desk.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/desk.c [iso-8859-1] Sun Dec 14 14:45:16 2008
@@ -162,7 +162,7 @@
InitPropSheetPage(&psh, PropPages[i].idDlg, PropPages[i].DlgProc,
PropPages[i].Callback);
}
- /* NOTE: Don;t call SHAddFromPropSheetExtArray here because this applet only allows
+ /* NOTE: Don't call SHAddFromPropSheetExtArray here because this applet only
allows
replacing the background page but not extending the applet by more pages */
ret = (LONG)(PropertySheet(&psh) != -1);
Modified: trunk/reactos/dll/cpl/desk/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/settings.c?re…
==============================================================================
--- trunk/reactos/dll/cpl/desk/settings.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/settings.c [iso-8859-1] Sun Dec 14 14:45:16 2008
@@ -151,8 +151,7 @@
DWORD ResolutionsCount = 1;
DWORD i;
- newEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(DISPLAY_DEVICE_ENTRY));
- memset(newEntry, 0, sizeof(DISPLAY_DEVICE_ENTRY));
+ newEntry = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DISPLAY_DEVICE_ENTRY));
if (!newEntry) goto ByeBye;
newEntry->Settings = GetPossibleSettings(DisplayDevice->DeviceName,
&newEntry->SettingsCount, &newEntry->CurrentSettings);
@@ -311,6 +310,7 @@
EnableWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_RESOLUTION), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_RESOLUTION_TEXT), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_ADVANCED), FALSE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_SPECTRUM), SW_HIDE);
}
else if (Result == 1)
{