Author: greatlrd
Date: Thu Jul 6 06:29:16 2006
New Revision: 22881
URL:
http://svn.reactos.org/svn/reactos?rev=22881&view=rev
Log:
Save Screen Saver you select with right value to the system register when u select apply
or ok
Modified:
trunk/reactos/dll/cpl/desk/screensaver.c
Modified: trunk/reactos/dll/cpl/desk/screensaver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/screensaver.c…
==============================================================================
--- trunk/reactos/dll/cpl/desk/screensaver.c (original)
+++ trunk/reactos/dll/cpl/desk/screensaver.c Thu Jul 6 06:29:16 2006
@@ -9,6 +9,7 @@
*/
#include "desk.h"
+void SetScreenSaver();
#define MAX_SCREENSAVERS 100
@@ -186,6 +187,7 @@
switch(lpnm->code) {
case PSN_APPLY:
{
+ SetScreenSaver();
return TRUE;
} break;
case NM_RCLICK:
@@ -398,3 +400,27 @@
}
}
+void SetScreenSaver()
+{
+ HKEY regKey;
+
+ RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), 0,
KEY_ALL_ACCESS, ®Key);
+ RegSetValueEx(regKey, TEXT("SCRNSAVE.EXE"), 0, REG_SZ, (BYTE
*)g_ScreenSaverItems[ImageListSelection].szFilename,
_tcslen(g_ScreenSaverItems[ImageListSelection].szFilename)*sizeof(TCHAR));
+ // RegSetValueEx(regKey, TEXT("SCRNSAVE.EXE"), 0, REG_SZ,
g_ScreenSaverItems[ImageListSelection].szFilename, sizeof(TCHAR) * 2);
+
+
+ RegCloseKey(regKey);
+
+ //if(g_backgroundItems[g_backgroundSelection].bWallpaper == TRUE)
+ //{
+ // SystemParametersInfo(SPI_SETDESKWALLPAPER,
+ // 0,
+ // g_backgroundItems[g_backgroundSelection].szFilename,
+ // SPIF_UPDATEINIFILE);
+ //}
+ //else
+ //{
+ // SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, TEXT(""),
SPIF_UPDATEINIFILE);
+ //}
+}
+