[ros-diffs] [greatlrd] 21609: Implement screensaver setting and
preiw of screen setting working in windows not tested in reactos
greatlrd at svn.reactos.org
greatlrd at svn.reactos.org
Sun Apr 16 15:56:57 CEST 2006
Author: greatlrd
Date: Sun Apr 16 17:56:57 2006
New Revision: 21609
URL: http://svn.reactos.ru/svn/reactos?rev=21609&view=rev
Log:
Implement screensaver setting and preiw of screen setting working in windows not tested in reactos
Modified:
trunk/reactos/dll/cpl/desk/screensaver.c
Modified: trunk/reactos/dll/cpl/desk/screensaver.c
URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/desk/screensaver.c?rev=21609&r1=21608&r2=21609&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/desk/screensaver.c (original)
+++ trunk/reactos/dll/cpl/desk/screensaver.c Sun Apr 16 17:56:57 2006
@@ -68,7 +68,28 @@
case IDC_SCREENS_TESTSC: // Screensaver Preview
{
if(command == BN_CLICKED)
- MessageBox(NULL, TEXT("That button doesn't do anything yet"), TEXT("Whoops"), MB_OK);
+ {
+ /*
+ /p:<hwnd> Run in preview
+ /s Run normal
+ /c:<hwnd> Run configuration, hwnd is handle of calling window
+ /a Run change password
+ */
+
+ WCHAR szCmdline[2048];
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ swprintf(szCmdline, L"%s /p",g_ScreenSaverItems[ImageListSelection].szFilename);
+
+ ZeroMemory( &si, sizeof(si) );
+ si.cb = sizeof(si);
+ ZeroMemory( &pi, sizeof(pi) );
+ if(CreateProcess( NULL, szCmdline, NULL, NULL, FALSE, 0, NULL,NULL,&si, &pi ))
+ {
+ CloseHandle( pi.hProcess );
+ CloseHandle( pi.hThread );
+ }
+ }
} break;
case IDC_SCREENS_DELETE: // Delete Screensaver
@@ -82,7 +103,29 @@
case IDC_SCREENS_SETTINGS: // Screensaver Settings
{
if(command == BN_CLICKED)
- MessageBox(NULL, TEXT("That button doesn't do anything yet"), TEXT("Whoops"), MB_OK);
+ {
+ /*
+ /p:<hwnd> Run in preview
+ /s Run normal
+ /c:<hwnd> Run configuration, hwnd is handle of calling window
+ /a Run change password
+
+ */
+
+ WCHAR szCmdline[2048];
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ swprintf(szCmdline, L"%s /c",g_ScreenSaverItems[ImageListSelection].szFilename);
+
+ ZeroMemory( &si, sizeof(si) );
+ si.cb = sizeof(si);
+ ZeroMemory( &pi, sizeof(pi) );
+ if(CreateProcess( NULL, szCmdline, NULL, NULL, FALSE, 0, NULL,NULL,&si, &pi ))
+ {
+ CloseHandle( pi.hProcess );
+ CloseHandle( pi.hThread );
+ }
+ }
} break;
case IDC_SCREENS_USEPASSCHK: // Screensaver Is Secure
{
More information about the Ros-diffs
mailing list