Author: cfinck
Date: Thu Feb 21 00:43:41 2008
New Revision: 32437
URL:
http://svn.reactos.org/svn/reactos?rev=32437&view=rev
Log:
- Remove much Win9x-specific stuff from the scrnsave library and make it more compatible
to the MS version of the library
- Change the 3dtext screensaver to use the library
- Reduce the amount of code in the blankscr screensaver to a minimum
- Remove unneeded resources from both screensavers
- Indentation fixes, MSVC build and warning fixes, small translation fixes, etc. for both
screensavers and the library
See issue #2966 for more details.
Added:
trunk/reactos/base/applications/screensavers/3dtext/3dtext.def (with props)
Modified:
trunk/reactos/base/applications/screensavers/3dtext/3dtext.c
trunk/reactos/base/applications/screensavers/3dtext/3dtext.rbuild
trunk/reactos/base/applications/screensavers/3dtext/lang/bg-BG.rc
trunk/reactos/base/applications/screensavers/3dtext/lang/de-DE.rc
trunk/reactos/base/applications/screensavers/3dtext/lang/el-GR.rc
trunk/reactos/base/applications/screensavers/3dtext/lang/en-US.rc
trunk/reactos/base/applications/screensavers/3dtext/lang/es-ES.rc
trunk/reactos/base/applications/screensavers/3dtext/lang/fr-FR.rc
trunk/reactos/base/applications/screensavers/3dtext/lang/it-IT.rc
trunk/reactos/base/applications/screensavers/3dtext/lang/lt-LT.rc
trunk/reactos/base/applications/screensavers/3dtext/lang/pl-PL.rc
trunk/reactos/base/applications/screensavers/3dtext/lang/ru-RU.rc
trunk/reactos/base/applications/screensavers/3dtext/lang/sk-SK.rc
trunk/reactos/base/applications/screensavers/3dtext/lang/uk-UA.rc
trunk/reactos/base/applications/screensavers/3dtext/resource.h
trunk/reactos/base/applications/screensavers/3dtext/rsrc.rc
trunk/reactos/include/psdk/scrnsave.h
trunk/reactos/lib/sdk/scrnsave/scrnsave.c
trunk/reactos/lib/sdk/scrnsave/scrnsave.rbuild
trunk/rosapps/applications/screensavers/blankscr/blankscr.rbuild
trunk/rosapps/applications/screensavers/blankscr/lang/bg-BG.rc
trunk/rosapps/applications/screensavers/blankscr/lang/de-DE.rc
trunk/rosapps/applications/screensavers/blankscr/lang/en-US.rc
trunk/rosapps/applications/screensavers/blankscr/lang/es-ES.rc
trunk/rosapps/applications/screensavers/blankscr/lang/fr-FR.rc
trunk/rosapps/applications/screensavers/blankscr/lang/lt-LT.rc
trunk/rosapps/applications/screensavers/blankscr/lang/nl-NL.rc
trunk/rosapps/applications/screensavers/blankscr/lang/pl-PL.rc
trunk/rosapps/applications/screensavers/blankscr/lang/sk-SK.rc
trunk/rosapps/applications/screensavers/blankscr/lang/uk-UA.rc
trunk/rosapps/applications/screensavers/blankscr/resource.h
trunk/rosapps/applications/screensavers/blankscr/scrnsave.c
trunk/rosapps/applications/screensavers/blankscr/scrnsave.def
trunk/rosapps/applications/screensavers/blankscr/scrnsave.rc
Modified: trunk/reactos/base/applications/screensavers/3dtext/3dtext.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/3dtext.c (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/3dtext.c Thu Feb 21 00:43:41 2008
@@ -19,6 +19,7 @@
*/
#include <windows.h>
+#include <scrnsave.h>
#include <math.h>
#include <GL/gl.h>
#include <GL/glu.h>
@@ -27,11 +28,11 @@
#include "resource.h"
#include "3dtext.h"
-static HGLRC hRC; // Permanent Rendering Context
-static HDC hDC; // Private GDI Device Context
-
-GLuint base; // Base Display List For The Font Set
-GLfloat rot; // Used To Rotate The Text
+static HGLRC hRC; // Permanent Rendering Context
+static HDC hDC; // Private GDI Device Context
+
+GLuint base; // Base Display List For The Font Set
+GLfloat rot; // Used To Rotate The Text
GLfloat extentX = 0.0f;
GLfloat extentY = 0.0f;
@@ -47,7 +48,7 @@
GLYPHMETRICSFLOAT gmf[256];
// Windows Font Handle
HFONT font;
- int i;
+ size_t i;
TCHAR c;
GLfloat cellOriginX = 0.0f;
GLfloat stringOriginX;
@@ -58,31 +59,31 @@
base = glGenLists(256);
font = CreateFont(-12,
- 0, // Width Of Font
- 0, // Angle Of Escapement
- 0, // Orientation Angle
- FW_BOLD, // Font Weight
- FALSE, // Italic
- FALSE, // Underline
- FALSE, // Strikeout
- DEFAULT_CHARSET, // Character Set Identifier
- OUT_TT_PRECIS, // Output Precision
- CLIP_DEFAULT_PRECIS, // Clipping Precision
- ANTIALIASED_QUALITY, // Output Quality
- FF_DONTCARE|DEFAULT_PITCH, // Family And Pitch
- _T("Tahoma")); // Font Name
+ 0, // Width Of Font
+ 0, // Angle Of Escapement
+ 0, // Orientation Angle
+ FW_BOLD, // Font Weight
+ FALSE, // Italic
+ FALSE, // Underline
+ FALSE, // Strikeout
+ DEFAULT_CHARSET, // Character Set Identifier
+ OUT_TT_PRECIS, // Output Precision
+ CLIP_DEFAULT_PRECIS, // Clipping Precision
+ ANTIALIASED_QUALITY, // Output Quality
+ FF_DONTCARE|DEFAULT_PITCH, // Family And Pitch
+ _T("Tahoma")); // Font Name
// Selects The Font We Created
SelectObject(hDC, font);
- wglUseFontOutlines(hDC, // Select The Current DC
- 0, // Starting Character
- 255, // Number Of Display Lists To Build
- base, // Starting Display Lists
- 0.0f, // Deviation From The True Outlines
- 0.2f, // Font Thickness In The Z Direction
- WGL_FONT_POLYGONS, // Use Polygons, Not Lines
- gmf); // Address Of Buffer To Recieve Data
+ wglUseFontOutlines(hDC, // Select The Current DC
+ 0, // Starting Character
+ 255, // Number Of Display Lists To Build
+ base, // Starting Display Lists
+ 0.0f, // Deviation From The True Outlines
+ 0.2f, // Font Thickness In The Z Direction
+ WGL_FONT_POLYGONS, // Use Polygons, Not Lines
+ gmf); // Address Of Buffer To Recieve Data
// Calculate the string extent
for (i = 0; i < _tcslen(m_Text); i++)
@@ -231,9 +232,9 @@
0.0f);
// Pulsing Colors Based On The Rotation
- glColor3f((1.0f * (cos(rot / 20.0f))),
- (1.0f * (sin(rot / 25.0f))),
- (1.0f - 0.5f * (cos(rot / 17.0f))));
+ glColor3f((1.0f * (GLfloat)(cos(rot / 20.0f))),
+ (1.0f * (GLfloat)(sin(rot / 25.0f))),
+ (1.0f - 0.5f * (GLfloat)(cos(rot / 17.0f))));
// Print GL Text To The Screen
glPrint(m_Text);
@@ -246,41 +247,37 @@
}
LRESULT CALLBACK
-WndProc(HWND hWnd,
- UINT message,
- WPARAM wParam,
- LPARAM lParam)
-{
- static POINT ptLast;
- static POINT ptCursor;
- static BOOL fFirstTime = TRUE;
- RECT Screen; // Used Later On To Get The Size Of The Window
- GLuint PixelFormat; // Pixel Format Storage
- static PIXELFORMATDESCRIPTOR pfd= // Pixel Format Descriptor
+ScreenSaverProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ RECT Screen; // Used Later On To Get The Size Of The
Window
+ GLuint PixelFormat; // Pixel Format Storage
+ static PIXELFORMATDESCRIPTOR pfd= // Pixel Format Descriptor
{
- sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor
- 1, // Version Number (?)
- PFD_DRAW_TO_WINDOW | // Format Must Support Window
- PFD_SUPPORT_OPENGL | // Format Must Support OpenGL
- PFD_DOUBLEBUFFER, // Must Support Double Buffering
- PFD_TYPE_RGBA, // Request An RGBA Format
- 16, // Select A 16Bit Color Depth
- 0, 0, 0, 0, 0, 0, // Color Bits Ignored (?)
- 0, // No Alpha Buffer
- 0, // Shift Bit Ignored (?)
- 0, // No Accumulation Buffer
- 0, 0, 0, 0, // Accumulation Bits Ignored (?)
- 16, // 16Bit Z-Buffer (Depth Buffer)
- 0, // No Stencil Buffer
- 0, // No Auxiliary Buffer (?)
- PFD_MAIN_PLANE, // Main Drawing Layer
- 0, // Reserved (?)
- 0, 0, 0 // Layer Masks Ignored (?)
+ sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor
+ 1, // Version Number (?)
+ PFD_DRAW_TO_WINDOW | // Format Must Support Window
+ PFD_SUPPORT_OPENGL | // Format Must Support OpenGL
+ PFD_DOUBLEBUFFER, // Must Support Double Buffering
+ PFD_TYPE_RGBA, // Request An RGBA Format
+ 16, // Select A 16Bit Color Depth
+ 0, 0, 0, 0, 0, 0, // Color Bits Ignored (?)
+ 0, // No Alpha Buffer
+ 0, // Shift Bit Ignored (?)
+ 0, // No Accumulation Buffer
+ 0, 0, 0, 0, // Accumulation Bits Ignored (?)
+ 16, // 16Bit Z-Buffer (Depth Buffer)
+ 0, // No Stencil Buffer
+ 0, // No Auxiliary Buffer (?)
+ PFD_MAIN_PLANE, // Main Drawing Layer
+ 0, // Reserved (?)
+ 0, 0, 0 // Layer Masks Ignored (?)
};
switch (message)
{
case WM_CREATE:
+ LoadSettings();
+
// Gets A Device Context For The Window
hDC = GetDC(hWnd);
@@ -338,7 +335,6 @@
break;
case WM_DESTROY:
- case WM_CLOSE:
// Disable Fullscreen Mode
ChangeDisplaySettings(NULL, 0);
@@ -353,9 +349,6 @@
// Free The DC
ReleaseDC(hWnd, hDC);
-
- // Quit The Program
- PostQuitMessage(0);
break;
case WM_PAINT:
@@ -363,157 +356,48 @@
SwapBuffers(hDC);
break;
- case WM_NOTIFY:
- case WM_SYSKEYDOWN:
- PostMessage(hWnd, WM_CLOSE, 0, 0);
- break;
-
- case WM_LBUTTONDOWN:
- case WM_LBUTTONUP:
- case WM_RBUTTONDOWN:
- case WM_RBUTTONUP:
- case WM_MBUTTONDOWN:
- case WM_MBUTTONUP:
- case WM_MOUSEMOVE:
- // If we've got a parent then we must be a preview
- if (GetParent(hWnd) != 0)
- return 0;
-
- if (fFirstTime)
- {
- GetCursorPos(&ptLast);
- fFirstTime = FALSE;
- }
-
- GetCursorPos(&ptCursor);
-
- // if the mouse has moved more than 3 pixels then exit
- if (abs(ptCursor.x - ptLast.x) >= 3 || abs(ptCursor.y - ptLast.y) >=
3)
- PostMessage(hWnd, WM_CLOSE, 0, 0);
-
- ptLast = ptCursor;
- return 0;
-
case WM_SIZE: // Resizing The Screen
// Resize To The New Window Size
ReSizeGLScene(LOWORD(lParam), HIWORD(lParam));
break;
default:
- // Pass Windows Messages
- return DefWindowProc(hWnd, message, wParam, lParam);
+ // Pass Windows Messages to the default screensaver window procedure
+ return DefScreenSaverProc(hWnd, message, wParam, lParam);
}
return 0;
}
-
-VOID InitSaver(HWND hwndParent)
-{
- WNDCLASS wc;
-
- ZeroMemory(&wc, sizeof(wc));
- wc.style = CS_HREDRAW | CS_VREDRAW;
- wc.lpfnWndProc = WndProc;
- wc.lpszClassName = APPNAME;
- RegisterClass(&wc);
-
- if (hwndParent != 0)
- {
- RECT rect;
-
- GetClientRect(hwndParent, &rect);
- CreateWindow(APPNAME, APPNAME,
- WS_VISIBLE | WS_CHILD,
- 0, 0,
- rect.right,
- rect.bottom,
- hwndParent, 0,
- hInstance, NULL);
- fullscreen = FALSE;
- }
- else
- {
- HWND hwnd;
- hwnd = CreateWindow(APPNAME, APPNAME,
- WS_VISIBLE | WS_POPUP | WS_EX_TOPMOST,
- 0, 0,
- GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN),
- HWND_DESKTOP, 0,
- hInstance, NULL);
- ShowWindow(hwnd, SW_SHOWMAXIMIZED);
- ShowCursor(FALSE);
- fullscreen = TRUE;
- }
-}
-
-//
-// Look for any options Windows has passed to us:
-//
-// -a <hwnd> (set password)
-// -s (screensave)
-// -p <hwnd> (preview)
-// -c <hwnd> (configure)
-//
-VOID ParseCommandLine(LPTSTR szCmdLine, UCHAR *chOption, HWND *hwndParent)
-{
- TCHAR ch = *szCmdLine++;
-
- if (ch == _T('-') || ch == _T('/'))
- ch = *szCmdLine++;
-
- //convert to lower case
- if (ch >= _T('A') && ch <= _T('Z'))
- ch += _T('a') - _T('A');
-
- *chOption = ch;
- ch = *szCmdLine++;
-
- if (ch == _T(':'))
- ch = *szCmdLine++;
-
- while (ch == _T(' ') || ch == _T('\t'))
- ch = *szCmdLine++;
-
- if (_istdigit(ch))
- {
- unsigned int i = _ttoi(szCmdLine - 1);
- *hwndParent = (HWND)i;
- }
- else
- {
- *hwndParent = NULL;
- }
-}
-
//
// Dialogbox procedure for Configuration window
//
-BOOL CALLBACK ConfigDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+BOOL CALLBACK ScreenSaverConfigureDialog(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
lParam)
{
switch (uMsg)
{
case WM_INITDIALOG:
- SetDlgItemText(hwnd, IDC_MESSAGE_TEXT, m_Text);
+ LoadSettings();
+ SetDlgItemText(hDlg, IDC_MESSAGE_TEXT, m_Text);
return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
- GetDlgItemText(hwnd, IDC_MESSAGE_TEXT, m_Text, MAX_PATH);
+ GetDlgItemText(hDlg, IDC_MESSAGE_TEXT, m_Text, MAX_PATH);
SaveSettings();
- EndDialog(hwnd, IDOK);
- break;
+
+ /* Fall through */
case IDCANCEL:
- EndDialog(hwnd, IDCANCEL);
+ EndDialog(hDlg, IDCANCEL);
break;
}
return FALSE;
case WM_CLOSE:
- EndDialog(hwnd, 0);
+ EndDialog(hDlg, 0);
break;
default:
@@ -523,46 +407,7 @@
return TRUE;
}
-VOID Configure(VOID)
-{
- DialogBox(hInstance, MAKEINTRESOURCE(IDD_CONFIG), NULL , (DLGPROC)ConfigDlgProc);
-}
-
-INT CALLBACK
-_tWinMain(HINSTANCE hInst,
- HINSTANCE hPrev,
- LPTSTR lpCmdLine,
- INT iCmdShow)
-{
- HWND hwndParent = 0;
- UCHAR chOption;
- MSG Message;
-
- hInstance = hInst;
-
- ParseCommandLine(lpCmdLine, &chOption, &hwndParent);
-
- LoadSettings();
-
- switch (chOption)
- {
- case _T('s'):
- InitSaver(0);
- break;
-
- case _T('p'):
- InitSaver(hwndParent);
- break;
-
- case _T('c'):
- default:
- Configure();
- return 0;
- }
-
- while (GetMessage(&Message, 0, 0, 0))
- DispatchMessage(&Message);
-
- return Message.wParam;
-}
-
+BOOL WINAPI RegisterDialogClasses(HANDLE hInst)
+{
+ return TRUE;
+}
Added: trunk/reactos/base/applications/screensavers/3dtext/3dtext.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/3dtext.def (added)
+++ trunk/reactos/base/applications/screensavers/3dtext/3dtext.def Thu Feb 21 00:43:41
2008
@@ -1,0 +1,5 @@
+NAME 3dtext.scr
+
+EXPORTS
+ ScreenSaverProc
+ ScreenSaverConfigureDialog
Propchange: trunk/reactos/base/applications/screensavers/3dtext/3dtext.def
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/base/applications/screensavers/3dtext/3dtext.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/3dtext.rbuild (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/3dtext.rbuild Thu Feb 21 00:43:41
2008
@@ -1,7 +1,8 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
-<module name="3dtext" type="win32scr"
installbase="system32" installname="3dtext.scr"
unicode="true">
- <define name="__USE_W32API" />
+<module name="3dtext" type="win32scr"
installbase="system32" installname="3dtext.scr"
unicode="yes">
+ <importlibrary definition="3dtext.def" />
+ <library>scrnsave</library>
<library>kernel32</library>
<library>user32</library>
<library>gdi32</library>
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/bg-BG.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/bg-BG.rc Thu Feb 21 00:43:41
2008
@@ -1,6 +1,6 @@
LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
-IDD_CONFIG DIALOGEX 0, 0, 273, 178
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
STYLE DS_SHELLFONT | DS_MODALFRAME| DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Íàñòðîéêè íà åêðàííèÿ ïðåäïàçèòåë ""Òðèìåðåí
òåêñò""."
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -8,12 +8,10 @@
DEFPUSHBUTTON "Äîáðå",IDOK,216,7,50,14
PUSHBUTTON "Îòêàç",IDCANCEL,216,24,50,14
EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
- LTEXT "Ñîáñòâåí òåêñò",IDC_STATIC_TEXT,18,17,65,8
+ LTEXT "Ñîáñòâåí òåêñò",IDC_STATIC,18,17,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Åêðàíåí ïðåäïàçèòåë ""Òðèìåðåí
òåêñò""."
- IDS_TITLE "Çà"
- IDS_TEXT "Íÿìà íóæäà îò íàñòðîéêè."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/de-DE.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/de-DE.rc Thu Feb 21 00:43:41
2008
@@ -1,19 +1,17 @@
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
-IDD_CONFIG DIALOGEX 0, 0, 273, 178
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "3D Text Bildschirmschoner Einstellungen"
+CAPTION "3D-Text Bildschirmschoner-Einstellungen"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,216,7,50,14
PUSHBUTTON "Abbrechen",IDCANCEL,216,24,50,14
EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
- LTEXT "Eigener Text",IDC_STATIC_TEXT,18,17,65,8
+ LTEXT "Eigener Text:",IDC_STATIC,18,17,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "3D Text Bildschirmschoner"
- IDS_TITLE "Über"
- IDS_TEXT "Keine Einstellungen nötig."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/el-GR.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/el-GR.rc Thu Feb 21 00:43:41
2008
@@ -1,6 +1,6 @@
LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
-IDD_CONFIG DIALOGEX 0, 0, 273, 178
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Ñõèìßóåéò ÊåéìÝíïõ 3Ä"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -8,12 +8,10 @@
DEFPUSHBUTTON "OK",IDOK,216,7,50,14
PUSHBUTTON "¢êõñï",IDCANCEL,216,24,50,14
EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
- LTEXT "ÐñïóáñìïóìÝíï êåßìåíï:",IDC_STATIC_TEXT,18,17,65,8
+ LTEXT "ÐñïóáñìïóìÝíï êåßìåíï:",IDC_STATIC,18,17,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Ðñïöýëáîç ïèüíçò ìå êåßìåíï 3Ä"
- IDS_TITLE "Ðåñß"
- IDS_TEXT "ÁõôÞ ç ðñïöýëáîç ïèüíçò äå äéáèÝôåé åðéëïãÝò ôéò ïðïßåò
ìðïñåßôå íá ïñßóåôå."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/en-US.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/en-US.rc Thu Feb 21 00:43:41
2008
@@ -1,6 +1,6 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_CONFIG DIALOGEX 0, 0, 273, 178
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "3D Text Screensaver Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -8,12 +8,10 @@
DEFPUSHBUTTON "OK",IDOK,216,7,50,14
PUSHBUTTON "Cancel",IDCANCEL,216,24,50,14
EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
- LTEXT "Custom text",IDC_STATIC_TEXT,18,17,65,8
+ LTEXT "Custom text",IDC_STATIC,18,17,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "3D Text ScreenSaver"
- IDS_TITLE "About"
- IDS_TEXT "No options need to be set."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/es-ES.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/es-ES.rc Thu Feb 21 00:43:41
2008
@@ -1,6 +1,6 @@
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
-IDD_CONFIG DIALOGEX 0, 0, 273, 178
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Configuración del Salvapantallas Texto en 3D"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -8,12 +8,10 @@
DEFPUSHBUTTON "Aceptar",IDOK,216,7,50,14
PUSHBUTTON "Cancelar",IDCANCEL,216,24,50,14
EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
- LTEXT "Texto personalizado",IDC_STATIC_TEXT,18,17,65,8
+ LTEXT "Texto personalizado",IDC_STATIC,18,17,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Salvapantallas Texto en 3D"
- IDS_TITLE "Acerca de.."
- IDS_TEXT "Ninguna opción necesita ser configurada."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/fr-FR.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/fr-FR.rc Thu Feb 21 00:43:41
2008
@@ -1,6 +1,6 @@
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
-IDD_CONFIG DIALOGEX 0, 0, 273, 178
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Paramètres de l'écran de veille Texte 3D"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -8,12 +8,10 @@
DEFPUSHBUTTON "OK",IDOK,216,7,50,14
PUSHBUTTON "Annuler",IDCANCEL,216,24,50,14
EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
- LTEXT "Texte personnalisé",IDC_STATIC_TEXT,18,17,65,8
+ LTEXT "Texte personnalisé",IDC_STATIC,18,17,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Écran de veille Texte 3D"
- IDS_TITLE "À propos de"
- IDS_TEXT "Il n'y a aucune option à définir."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/it-IT.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/it-IT.rc Thu Feb 21 00:43:41
2008
@@ -1,6 +1,6 @@
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
-IDD_CONFIG DIALOGEX 0, 0, 273, 178
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Impostazioni del salvaschermo 'Testo 3D'"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -8,12 +8,10 @@
DEFPUSHBUTTON "OK",IDOK,216,7,50,14
PUSHBUTTON "Annulla",IDCANCEL,216,24,50,14
EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
- LTEXT "Testo personalizzato",IDC_STATIC_TEXT,18,17,65,8
+ LTEXT "Testo personalizzato",IDC_STATIC,18,17,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Salvaschermo 'Testo 3D'"
- IDS_TITLE "Informazioni"
- IDS_TEXT "Nessuna impostazione da effettuare."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/lt-LT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/lt-LT.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/lt-LT.rc Thu Feb 21 00:43:41
2008
@@ -9,7 +9,7 @@
LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT
-IDD_CONFIG DIALOGEX 0, 0, 136, 58
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 136, 58
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Ekrano uþsklandos nustatymai"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -17,12 +17,10 @@
DEFPUSHBUTTON "OK",IDOK,14,38,50,14
PUSHBUTTON "Atðaukti",IDCANCEL,72,38,50,14
EDITTEXT IDC_MESSAGE_TEXT,6,18,122,14,ES_AUTOHSCROLL
- LTEXT "Pasirinktas tekstas",IDC_STATIC_TEXT,7,7,65,8
+ LTEXT "Pasirinktas tekstas",IDC_STATIC,7,7,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "3D tekstas"
- IDS_TITLE "Apie"
- IDS_TEXT "Nëra keièiamø parametrø."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/pl-PL.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/pl-PL.rc Thu Feb 21 00:43:41
2008
@@ -7,7 +7,7 @@
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
-IDD_CONFIG DIALOGEX 0, 0, 273, 178
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "3D Text Screensaver Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -15,12 +15,10 @@
DEFPUSHBUTTON "OK",IDOK,216,7,50,14
PUSHBUTTON "Anuluj",IDCANCEL,216,24,50,14
EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
- LTEXT "W³asny tekst",IDC_STATIC_TEXT,18,17,65,8
+ LTEXT "W³asny tekst",IDC_STATIC,18,17,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Wygaszacz ekranu Tekst 3d"
- IDS_TITLE "O programie"
- IDS_TEXT "Brak opcji."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/ru-RU.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/ru-RU.rc Thu Feb 21 00:43:41
2008
@@ -1,6 +1,6 @@
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-IDD_CONFIG DIALOGEX 0, 0, 273, 178
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Ïàðàìåòðû çàñòàâêè"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -8,12 +8,10 @@
DEFPUSHBUTTON "OK",IDOK,216,7,50,14
PUSHBUTTON "Îòìåíà",IDCANCEL,216,24,50,14
EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
- LTEXT "Äðóãîé òåêñò",IDC_STATIC_TEXT,18,17,65,8
+ LTEXT "Äðóãîé òåêñò",IDC_STATIC,18,17,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Çàñòàâêà 3D-òåêñò"
- IDS_TITLE "Î ïðîãðàììå"
- IDS_TEXT "Ýòà çàñòàâêà íå èìååò íàñòðàèâàåìûõ ïàðàìåòðîâ."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/sk-SK.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/sk-SK.rc Thu Feb 21 00:43:41
2008
@@ -4,7 +4,7 @@
LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
-IDD_CONFIG DIALOGEX 0, 0, 273, 178
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Nastavenie etrièa obrazovky 3D text"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -12,12 +12,10 @@
DEFPUSHBUTTON "OK",IDOK,216,7,50,14
PUSHBUTTON "Zrui",IDCANCEL,216,24,50,14
EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
- LTEXT "¼ubovo¾ný text",IDC_STATIC_TEXT,18,17,65,8
+ LTEXT "¼ubovo¾ný text",IDC_STATIC,18,17,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "3D text - etriè obrazovky"
- IDS_TITLE "Èo je ..."
- IDS_TEXT "Nie sú potrebné iadne nastavenia."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/lang/uk-UA.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/lang/uk-UA.rc Thu Feb 21 00:43:41
2008
@@ -8,7 +8,7 @@
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
-IDD_CONFIG DIALOGEX 0, 0, 273, 178
+DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Ïàðàìåòðû çàñòàâêè ""Îá'ºìíèé òåêñò"""
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -16,12 +16,10 @@
DEFPUSHBUTTON "OK",IDOK,216,7,50,14
PUSHBUTTON "Ñêàñóâàòè",IDCANCEL,216,24,50,14
EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL
- LTEXT "Òåêñò",IDC_STATIC_TEXT,18,17,65,8
+ LTEXT "Òåêñò",IDC_STATIC,18,17,65,8
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Çàñòàâêà ""Îá'ºìíèé òåêñò"""
- IDS_TITLE "Ïðî"
- IDS_TEXT "Öÿ çàñòàâêà íå ìຠíàëàøòîâóâàíèõ ïàðàìåòð³â."
END
Modified: trunk/reactos/base/applications/screensavers/3dtext/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/resource.h (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/resource.h Thu Feb 21 00:43:41
2008
@@ -1,23 +1,2 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by en-US.rc
-//
-#define IDD_CONFIG 9
-#define IDD_DIALOG1 101
-#define IDC_MESSAGE_TEXT 1001
-#define IDC_STATIC_TEXT 1002
-
-#define IDS_DESCRIPTION 1
-#define IDS_TITLE 2
-#define IDS_TEXT 3
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 102
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1003
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+#define IDC_STATIC -1
+#define IDC_MESSAGE_TEXT 1001
Modified: trunk/reactos/base/applications/screensavers/3dtext/rsrc.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/3dtext/rsrc.rc (original)
+++ trunk/reactos/base/applications/screensavers/3dtext/rsrc.rc Thu Feb 21 00:43:41 2008
@@ -1,13 +1,13 @@
#include <windows.h>
+#include <scrnsave.h>
#include "resource.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "OpenGL 3DText ScreenSaver\0"
-#define REACTOS_STR_INTERNAL_NAME "ss3dtext\0"
-#define REACTOS_STR_ORIGINAL_FILENAME "ss3dtext.scr\0"
-
+#define REACTOS_STR_INTERNAL_NAME "3dtext\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "3dtext.scr\0"
#include <reactos/version.rc>
#include "lang/bg-BG.rc"
@@ -19,6 +19,6 @@
#include "lang/it-IT.rc"
#include "lang/lt-LT.rc"
#include "lang/pl-PL.rc"
+#include "lang/ru-RU.rc"
#include "lang/sk-SK.rc"
#include "lang/uk-UA.rc"
-#include "lang/ru-RU.rc"
Modified: trunk/reactos/include/psdk/scrnsave.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/scrnsave.h?re…
==============================================================================
--- trunk/reactos/include/psdk/scrnsave.h (original)
+++ trunk/reactos/include/psdk/scrnsave.h Thu Feb 21 00:43:41 2008
@@ -1,78 +1,70 @@
/*
- Screen saver library by Anders Norlander <anorland(a)hem2.passagen.se>
+ * PROJECT: ReactOS Screen Saver Library
+ * LICENSE: GPL v2 or any later version
+ * FILE: include/psdk/scrnsave.h
+ * PURPOSE: Header file for the library
+ * PROGRAMMERS: Anders Norlander <anorland(a)hem2.passagen.se>
+ * Colin Finck <mail(a)colinfinck.de>
+ */
- This library is (hopefully) compatible with Microsoft's
- screen saver library.
-
- This is public domain software.
-
- */
#ifndef _SCRNSAVE_H
#define _SCRNSAVE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
#ifdef __cplusplus
extern "C" {
#endif
-/* configure dialog identifier */
-#define DLG_SCRNSAVECONFIGURE 2003
+#define idsIsPassword 1000
+#define idsIniFile 1001
+#define idsScreenSaver 1002
+#define idsPassword 1003
+#define idsDifferentPW 1004
+#define idsChangePW 1005
+#define idsBadOldPW 1006
+#define idsAppName 1007
+#define idsNoHelpMemory 1008
+#define idsHelpFile 1009
+#define idsDefKeyword 1010
-#define idsIsPassword 1000
-#define idsIniFile 1001
-#define idsScreenSaver 1002
-#define idsPassword 1003
-#define idsDifferentPW 1004
-#define idsChangePW 1005
-#define idsBadOldPW 1006
-#define idsAppName 1007
-#define idsNoHelpMemory 1008
-#define idsHelpFile 1009
-#define idsDefKeyword 1010
+// If you add a configuration dialog for your screen saver, it must have this dialog ID.
+#define DLG_SCRNSAVECONFIGURE 2003
-#define IDS_DESCRIPTION 1
-#define ID_APP 100
+#define IDS_DESCRIPTION 1
+#define ID_APP 100
-#define WS_GT (WS_GROUP | WS_TABSTOP)
-#define SCRM_VERIFYPW WM_APP
-#define MAXFILELEN 13
-#define TITLEBARNAMELEN 40
-#define APPNAMEBUFFERLEN 40
-#define BUFFLEN 255
+#define WS_GT (WS_GROUP | WS_TABSTOP)
+#define MAXFILELEN 13
+#define TITLEBARNAMELEN 40
+#define APPNAMEBUFFERLEN 40
+#define BUFFLEN 255
-#ifndef RC_INVOKED
+// The dialog procedure of the screen saver configure dialog (if any)
+// If you don't have a configuration dialog, just implement a procedure that always
returns FALSE.
+BOOL WINAPI ScreenSaverConfigureDialog(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
lParam);
-/* functions provided by the aothor of the screen saver */
-BOOL WINAPI ScreenSaverConfigureDialog(HWND,UINT,WPARAM,LPARAM);
-BOOL WINAPI RegisterDialogClasses(HANDLE);
-LONG WINAPI ScreenSaverProc(HWND,UINT,WPARAM,LPARAM);
+// Use this function if you want to register special classes before opening the
configuration dialog.
+// Return TRUE here if the classes were registered successfully and the configuration
dialog shall be opened.
+// If you return FALSE, no configuration dialog will be opened.
+BOOL WINAPI RegisterDialogClasses(HANDLE hInst);
-/* Change name of function if we are using UNICODE */
-#ifdef UNICODE
-#define DefScreenSaverProc DefScreenSaverProcW
-#endif
+// The screen saver window procedure
+LRESULT WINAPI ScreenSaverProc(HWND, UINT uMsg, WPARAM wParam, LPARAM lParam);
-/* default screen saver proc; call instead of DefWindowProc */
-LONG WINAPI DefScreenSaverProc(HWND,UINT,WPARAM,LPARAM);
+// The window procedure, which handles default tasks for screen savers.
+// Use this instead of DefWindowProc.
+LRESULT WINAPI DefScreenSaverProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-/* change password */
-void WINAPI ScreenSaverChangePassword(HWND);
-
-/* globals that may be used by screen saver */
-extern HINSTANCE hMainInstance;
-extern HWND hMainWindow;
-extern BOOL fChildPreview;
-extern TCHAR szName[];
-extern TCHAR szAppName[];
-extern TCHAR szIniFile[];
-extern TCHAR szScreenSaver[];
-extern TCHAR szHelpFile[];
-extern TCHAR szNoHelpMemory[];
-extern UINT MyHelpMessage;
-
-#endif /* RC_INVOKED */
+// These globals are defined in the screen saver library.
+extern HINSTANCE hMainInstance;
+extern HWND hMainWindow;
+extern BOOL fChildPreview;
+extern TCHAR szName[];
+extern TCHAR szAppName[];
+extern TCHAR szIniFile[];
+extern TCHAR szScreenSaver[];
+extern TCHAR szHelpFile[];
+extern TCHAR szNoHelpMemory[];
+extern UINT MyHelpMessage;
#ifdef __cplusplus
}
Modified: trunk/reactos/lib/sdk/scrnsave/scrnsave.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/scrnsave/scrnsave.…
==============================================================================
--- trunk/reactos/lib/sdk/scrnsave/scrnsave.c (original)
+++ trunk/reactos/lib/sdk/scrnsave/scrnsave.c Thu Feb 21 00:43:41 2008
@@ -1,21 +1,20 @@
/*
- Screen saver library by Anders Norlander <anorland(a)hem2.passagen.se>
-
- This library is (hopefully) compatible with Microsoft's
- screen saver library.
-
- This is public domain software.
-
+ * PROJECT: ReactOS Screen Saver Library
+ * LICENSE: GPL v2 or any later version
+ * FILE: lib/sdk/scrnsave/scrnsave.c
+ * PURPOSE: Library for writing screen savers, compatible with MS'
scrnsave.lib
+ * PROGRAMMERS: Anders Norlander <anorland(a)hem2.passagen.se>
+ * Colin Finck <mail(a)colinfinck.de>
*/
#include <windows.h>
+#include <tchar.h>
#include <scrnsave.h>
-#include <regstr.h>
-
-/* screen saver window class */
+
+// Screen Saver window class
#define CLASS_SCRNSAVE TEXT("WindowsScreenSaverClass")
-/* globals */
+// Globals
HWND hMainWindow = NULL;
BOOL fChildPreview = FALSE;
HINSTANCE hMainInstance;
@@ -27,45 +26,21 @@
TCHAR szNoHelpMemory[BUFFLEN];
UINT MyHelpMessage;
-/* local house keeping */
-static HINSTANCE hPwdLib = NULL;
+// Local house keeping
static POINT pt_orig;
-static BOOL checking_pwd = FALSE;
-static BOOL closing = FALSE;
-static BOOL w95 = FALSE;
-
-typedef BOOL (WINAPI *VERIFYPWDPROC)(HWND);
-typedef DWORD (WINAPI *CHPWDPROC)(LPCTSTR, HWND, DWORD, PVOID);
-static VERIFYPWDPROC VerifyScreenSavePwd = NULL;
-
-/* function names */
-#define szVerifyPassword "VerifyScreenSavePwd"
-
-#ifdef UNICODE
-#define szPwdChangePassword "PwdChangePasswordW"
-#else
-#define szPwdChangePassword "PwdChangePasswordA"
-#endif
-
-static void TerminateScreenSaver(HWND hWnd);
-static BOOL RegisterClasses(void);
-static LRESULT WINAPI SysScreenSaverProc(HWND,UINT,WPARAM,LPARAM);
-static int LaunchScreenSaver(HWND hParent);
-static void LaunchConfig(void);
-
-static int ISSPACE(char c)
+
+static int ISSPACE(TCHAR c)
{
return (c == ' ' || c == '\t');
}
#define ISNUM(c) ((c) >= '0' && c <= '9')
-static unsigned long
-_toul(const char *s)
+static unsigned long _toul(const TCHAR *s)
{
unsigned long res;
unsigned long n;
- const char *p;
+ const TCHAR *p;
for (p = s; *p; p++)
if (!ISNUM(*p))
@@ -80,204 +55,18 @@
return res;
}
-/* screen saver entry point */
-int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInst,
- LPSTR CmdLine, int nCmdShow)
-{
- LPSTR p;
- OSVERSIONINFO vi;
-
- /* initialize */
- hMainInstance = hInst;
-
- vi.dwOSVersionInfoSize = sizeof(vi);
- GetVersionEx(&vi);
- /* check if we are going to check for passwords */
- if (vi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
- {
- HKEY hKey;
- /* we are using windows 95 */
- w95 = TRUE;
- if (RegOpenKey(HKEY_CURRENT_USER, REGSTR_PATH_SCREENSAVE ,&hKey) ==
- ERROR_SUCCESS)
- {
- DWORD check_pwd;
- DWORD size = sizeof(DWORD);
- DWORD type;
- LONG res;
-
- res = RegQueryValueEx(hKey, REGSTR_VALUE_USESCRPASSWORD,
- NULL, &type, (PBYTE)
&check_pwd, &size);
-
- if (check_pwd && res == ERROR_SUCCESS)
- {
- hPwdLib = LoadLibrary(TEXT("PASSWORD.CPL"));
- if (hPwdLib)
- VerifyScreenSavePwd = GetProcAddress(hPwdLib, szVerifyPassword);
- }
-
- RegCloseKey(hKey);
- }
- }
-
- /* parse arguments */
- for (p = CmdLine; *p; p++)
- {
- switch (*p)
- {
- case 'S':
- case 's':
- /* start screen saver */
- return LaunchScreenSaver(NULL);
-
- case 'P':
- case 'p':
- {
- /* start screen saver in preview window */
- HWND hParent;
- fChildPreview = TRUE;
-
- while (ISSPACE(*++p));
- hParent = (HWND) _toul(p);
-
- if (hParent && IsWindow(hParent))
- return LaunchScreenSaver(hParent);
- }
- return 0;
-
- case 'C':
- case 'c':
- /* display configure dialog */
- LaunchConfig();
- return 0;
-
- case 'A':
- case 'a':
- {
- /* change screen saver password */
- HWND hParent;
- while (ISSPACE(*++p));
- hParent = (HWND) _toul(p);
-
- if (!hParent || !IsWindow(hParent))
- hParent = GetForegroundWindow();
-
- ScreenSaverChangePassword(hParent);
- }
- return 0;
-
- case '-':
- case '/':
- case ' ':
- default:
- break;
- }
- }
-
- LaunchConfig();
-
- return 0;
-}
-
-static void LaunchConfig(void)
-{
- /* FIXME: should this be called */
- RegisterDialogClasses(hMainInstance);
-
- /* display configure dialog */
- DialogBox(hMainInstance, MAKEINTRESOURCE(DLG_SCRNSAVECONFIGURE),
- GetForegroundWindow(), (DLGPROC) ScreenSaverConfigureDialog);
-}
-
-static int LaunchScreenSaver(HWND hParent)
-{
- BOOL foo;
- UINT style;
- RECT rc;
- MSG msg;
-
- /* don't allow other tasks to get into the foreground */
- if (w95 && !fChildPreview)
- SystemParametersInfo(SPI_SCREENSAVERRUNNING, TRUE, &foo, 0);
-
- msg.wParam = 0;
-
- /* register classes, both user defined and classes used by screen saver
- library */
- if (!RegisterClasses())
- {
- MessageBox(NULL, TEXT("RegisterClasses() failed"), NULL, MB_ICONHAND);
- goto restore;
- }
-
- /* a slightly different approach needs to be used when displaying
- in a preview window */
- if (hParent)
- {
- style = WS_CHILD;
- GetClientRect(hParent, &rc);
- }
- else
- {
- style = WS_POPUP;
- rc.right = GetSystemMetrics(SM_CXSCREEN);
- rc.bottom = GetSystemMetrics(SM_CYSCREEN);
- style |= WS_VISIBLE;
- }
-
- /* create main screen saver window */
- hMainWindow = CreateWindowEx(hParent ? 0 : WS_EX_TOPMOST, CLASS_SCRNSAVE,
- TEXT("SCREENSAVER"), style,
- 0, 0, rc.right, rc.bottom, hParent, NULL,
- hMainInstance, NULL);
-
- /* display window and start pumping messages */
- if (hMainWindow)
- {
- UpdateWindow(hMainWindow);
- ShowWindow(hMainWindow, SW_SHOW);
-
- while (GetMessage(&msg, NULL, 0, 0) == TRUE)
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
-
-restore:
- /* restore system */
- if (w95 && !fChildPreview)
- SystemParametersInfo(SPI_SCREENSAVERRUNNING, FALSE, &foo, 0);
-
- FreeLibrary(hPwdLib);
- return msg.wParam;
-}
-
-/* this function takes care of *must* do tasks, like terminating
- screen saver */
-static LRESULT WINAPI SysScreenSaverProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
lParam)
-{
- switch (msg)
+// This function takes care of *must* do tasks, like terminating screen saver
+static LRESULT WINAPI SysScreenSaverProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
lParam)
+{
+ switch(uMsg)
{
case WM_CREATE:
- if (!fChildPreview)
- SetCursor(NULL);
- /* mouse is not supposed to move from this position */
+ // Mouse is not supposed to move from this position
GetCursorPos(&pt_orig);
break;
case WM_DESTROY:
PostQuitMessage(0);
- break;
-
- case WM_TIMER:
- if (closing)
- return 0;
- break;
-
- case WM_PAINT:
- if (closing)
- return DefWindowProc(hWnd, msg, wParam, lParam);
break;
case WM_SYSCOMMAND:
@@ -287,64 +76,32 @@
{
case SC_CLOSE:
case SC_SCREENSAVE:
- case SC_NEXTWINDOW:
- case SC_PREVWINDOW:
return FALSE;
}
}
break;
-
- case WM_MOUSEMOVE:
- case WM_LBUTTONDOWN:
- case WM_RBUTTONDOWN:
- case WM_MBUTTONDOWN:
- case WM_KEYDOWN:
- case WM_SYSKEYDOWN:
+ }
+
+ return ScreenSaverProc(hWnd, uMsg, wParam, lParam);
+}
+
+LRESULT WINAPI DefScreenSaverProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ // Don't do any special processing when in preview mode
+ if (fChildPreview)
+ return DefWindowProc(hWnd, uMsg, wParam, lParam);
+
+ switch (uMsg)
+ {
case WM_NCACTIVATE:
case WM_ACTIVATE:
case WM_ACTIVATEAPP:
- if (closing)
- return DefWindowProc(hWnd, msg, wParam, lParam);
-
- break;
- }
-
- return ScreenSaverProc(hWnd, msg, wParam, lParam);
-}
-
-LONG WINAPI DefScreenSaverProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- /* don't do any special processing when in preview mode */
- if (fChildPreview || closing)
- return DefWindowProc(hWnd, msg, wParam, lParam);
-
- switch (msg)
- {
- case WM_CLOSE:
- TerminateScreenSaver(hWnd);
- /* do NOT pass this to DefWindowProc; it will terminate even if
- an invalid password was given.
- */
- return 0;
-
- case SCRM_VERIFYPW:
- /* verify password or return TRUE if password checking is turned off */
- if (VerifyScreenSavePwd)
- return VerifyScreenSavePwd(hWnd);
- else
- return TRUE;
-
- case WM_SETCURSOR:
- if (checking_pwd)
- break;
- SetCursor(NULL);
- return TRUE;
-
- case WM_NCACTIVATE:
- case WM_ACTIVATE:
- case WM_ACTIVATEAPP:
- if (wParam != FALSE)
- break;
+ if (!wParam)
+ {
+ // wParam is FALSE, so the screensaver is losing the focus.
+ PostMessage(hWnd, WM_CLOSE, 0, 0);
+ }
+ break;
case WM_MOUSEMOVE:
{
@@ -352,86 +109,141 @@
GetCursorPos(&pt);
if (pt.x == pt_orig.x && pt.y == pt_orig.y)
break;
+
+ // Fall through
}
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_KEYDOWN:
- case WM_SYSKEYDOWN:
- /* try to terminate screen saver */
- if (!checking_pwd)
- PostMessage(hWnd, WM_CLOSE, 0, 0);
- break;
- }
-
- return DefWindowProc(hWnd, msg, wParam, lParam);
-}
-
-static void TerminateScreenSaver(HWND hWnd)
-{
- /* don't allow recursion */
- if (checking_pwd || closing)
- return;
-
- /* verify password */
- if (VerifyScreenSavePwd)
- {
- checking_pwd = TRUE;
- closing = SendMessage(hWnd, SCRM_VERIFYPW, 0, 0);
- checking_pwd = FALSE;
- }
- else
- closing = TRUE;
-
- /* are we closing? */
- if (closing)
- {
- DestroyWindow(hWnd);
- }
- else
- GetCursorPos(&pt_orig); /* if not: get new mouse position */
-}
-
-/*
- Register screen saver window class and call user
- supplied hook.
- */
-static BOOL RegisterClasses(void)
-{
- WNDCLASS cls;
- ZeroMemory(&cls, sizeof(cls));
- cls.hCursor = NULL;
- cls.hIcon = LoadIcon(hMainInstance, MAKEINTATOM(ID_APP));
- cls.lpszMenuName = NULL;
+ case WM_KEYUP:
+ // Send a WM_CLOSE to close the screen saver (allows the screensaver author
to do clean-up tasks)
+ PostMessage(hWnd, WM_CLOSE, 0, 0);
+ break;
+
+ case WM_SETCURSOR:
+ SetCursor(NULL);
+ return TRUE;
+ }
+
+ return DefWindowProc(hWnd, uMsg, wParam, lParam);
+}
+
+// Registers the screen saver window class
+static BOOL RegisterScreenSaverClass(void)
+{
+ WNDCLASS cls = {0,};
+
+ cls.hIcon = LoadIcon(hMainInstance, MAKEINTATOM(ID_APP));
cls.lpszClassName = CLASS_SCRNSAVE;
- cls.hbrBackground = NULL; //(HBRUSH)GetStockObject(BLACK_BRUSH);
+ cls.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
cls.hInstance = hMainInstance;
cls.style = CS_VREDRAW | CS_HREDRAW | CS_SAVEBITS | CS_PARENTDC;
- cls.lpfnWndProc = (WNDPROC) SysScreenSaverProc;
- cls.cbWndExtra = 0;
- cls.cbClsExtra = 0;
-
- if (!RegisterClass(&cls))
- return FALSE;
-
- return RegisterDialogClasses(hMainInstance);
-}
-
-void WINAPI ScreenSaverChangePassword(HWND hParent)
-{
- /* load Master Password Router (MPR) */
- HINSTANCE hMpr = LoadLibrary(TEXT("MPR.DLL"));
-
- if (hMpr)
- {
- CHPWDPROC ChangePassword;
- ChangePassword = (CHPWDPROC) GetProcAddress(hMpr, szPwdChangePassword);
-
- /* change password for screen saver provider */
- if (ChangePassword)
- ChangePassword(TEXT("SCRSAVE"), hParent, 0, NULL);
-
- FreeLibrary(hMpr);
- }
-}
+ cls.lpfnWndProc = (WNDPROC)SysScreenSaverProc;
+
+ return RegisterClass(&cls) != 0;
+}
+
+static void LaunchConfig(void)
+{
+ // Only show the dialog if the RegisterDialogClasses function succeeded.
+ // This is the same behaviour as MS' scrnsave.lib.
+ if( RegisterDialogClasses(hMainInstance) )
+ DialogBox(hMainInstance, MAKEINTRESOURCE(DLG_SCRNSAVECONFIGURE),
GetForegroundWindow(), (DLGPROC) ScreenSaverConfigureDialog);
+}
+
+static int LaunchScreenSaver(HWND hParent)
+{
+ UINT style;
+ RECT rc;
+ MSG msg;
+
+ if (!RegisterScreenSaverClass())
+ {
+ MessageBox(NULL, TEXT("RegisterClass() failed"), NULL, MB_ICONHAND);
+ return 1;
+ }
+
+ // A slightly different approach needs to be used when displaying in a preview
window
+ if (hParent)
+ {
+ style = WS_CHILD;
+ GetClientRect(hParent, &rc);
+ }
+ else
+ {
+ style = WS_POPUP;
+ rc.right = GetSystemMetrics(SM_CXSCREEN);
+ rc.bottom = GetSystemMetrics(SM_CYSCREEN);
+ style |= WS_VISIBLE;
+ }
+
+ // Create the main screen saver window
+ hMainWindow = CreateWindowEx(hParent ? 0 : WS_EX_TOPMOST, CLASS_SCRNSAVE,
+ TEXT("SCREENSAVER"), style,
+ 0, 0, rc.right, rc.bottom, hParent, NULL,
+ hMainInstance, NULL);
+
+ // Display window and start pumping messages
+ if (hMainWindow)
+ {
+ ShowWindow(hMainWindow, SW_SHOW);
+
+ while (GetMessage(&msg, NULL, 0, 0))
+ DispatchMessage(&msg);
+ }
+
+ return msg.wParam;
+}
+
+// Screen Saver entry point
+int APIENTRY _tWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR CmdLine, int
nCmdShow)
+{
+ LPTSTR p;
+
+ hMainInstance = hInst;
+
+ // Parse the arguments
+ for (p = CmdLine; *p; p++)
+ {
+ switch (*p)
+ {
+ case 'S':
+ case 's':
+ // Start the screen saver
+ return LaunchScreenSaver(NULL);
+
+ case 'P':
+ case 'p':
+ {
+ // Start the screen saver in preview mode
+ HWND hParent;
+ fChildPreview = TRUE;
+
+ while (ISSPACE(*++p));
+ hParent = (HWND) _toul(p);
+
+ if (hParent && IsWindow(hParent))
+ return LaunchScreenSaver(hParent);
+ }
+ return 0;
+
+ case 'C':
+ case 'c':
+ // Display the configuration dialog
+ LaunchConfig();
+ return 0;
+
+ case '-':
+ case '/':
+ case ' ':
+ default:
+ break;
+ }
+ }
+
+ LaunchConfig();
+
+ return 0;
+}
Modified: trunk/reactos/lib/sdk/scrnsave/scrnsave.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/scrnsave/scrnsave.…
==============================================================================
--- trunk/reactos/lib/sdk/scrnsave/scrnsave.rbuild (original)
+++ trunk/reactos/lib/sdk/scrnsave/scrnsave.rbuild Thu Feb 21 00:43:41 2008
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
<group>
-<module name="scrnsave" type="staticlibrary">
- <file>scrnsave.c</file>
-</module>
+ <module name="scrnsave" type="staticlibrary"
unicode="yes">
+ <file>scrnsave.c</file>
+ </module>
</group>
Modified: trunk/rosapps/applications/screensavers/blankscr/blankscr.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/blankscr.rbuild (original)
+++ trunk/rosapps/applications/screensavers/blankscr/blankscr.rbuild Thu Feb 21 00:43:41
2008
@@ -1,15 +1,11 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
-<module name="blankscr" type="win32scr"
installbase="system32" installname="scrnsave.scr">
+<module name="blankscr" type="win32scr"
installbase="system32" installname="scrnsave.scr"
unicode="yes">
<importlibrary definition="scrnsave.def" />
<library>scrnsave</library>
<library>kernel32</library>
<library>user32</library>
<library>gdi32</library>
- <library>opengl32</library>
- <library>glu32</library>
- <library>advapi32</library>
- <library>shell32</library>
<file>scrnsave.c</file>
<file>scrnsave.rc</file>
Modified: trunk/rosapps/applications/screensavers/blankscr/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/lang/bg-BG.rc (original)
+++ trunk/rosapps/applications/screensavers/blankscr/lang/bg-BG.rc Thu Feb 21 00:43:41
2008
@@ -3,6 +3,5 @@
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Blank"
- IDS_TITLE "Çà"
IDS_TEXT "Íÿìà âúçìîæíîñò çà íàñòðîéêè."
END
Modified: trunk/rosapps/applications/screensavers/blankscr/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/lang/de-DE.rc (original)
+++ trunk/rosapps/applications/screensavers/blankscr/lang/de-DE.rc Thu Feb 21 00:43:41
2008
@@ -2,7 +2,6 @@
STRINGTABLE DISCARDABLE
BEGIN
- IDS_DESCRIPTION "Blank"
- IDS_TITLE "Über"
+ IDS_DESCRIPTION "Schwarzer Bildschirm"
IDS_TEXT "Keinerlei Einstellungen notwendig."
END
Modified: trunk/rosapps/applications/screensavers/blankscr/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/lang/en-US.rc (original)
+++ trunk/rosapps/applications/screensavers/blankscr/lang/en-US.rc Thu Feb 21 00:43:41
2008
@@ -2,7 +2,6 @@
STRINGTABLE DISCARDABLE
BEGIN
- IDS_DESCRIPTION "Blank"
- IDS_TITLE "About"
+ IDS_DESCRIPTION "Blank screen"
IDS_TEXT "No options need to be set."
END
Modified: trunk/rosapps/applications/screensavers/blankscr/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/lang/es-ES.rc (original)
+++ trunk/rosapps/applications/screensavers/blankscr/lang/es-ES.rc Thu Feb 21 00:43:41
2008
@@ -3,6 +3,5 @@
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "En blanco"
- IDS_TITLE "Acerca de"
IDS_TEXT "Ninguna opción necesita ser configurada."
END
Modified: trunk/rosapps/applications/screensavers/blankscr/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/lang/fr-FR.rc (original)
+++ trunk/rosapps/applications/screensavers/blankscr/lang/fr-FR.rc Thu Feb 21 00:43:41
2008
@@ -3,6 +3,5 @@
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Vide"
- IDS_TITLE "À propos de"
IDS_TEXT "Il n'y a aucune option à définir."
END
Modified: trunk/rosapps/applications/screensavers/blankscr/lang/lt-LT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/lang/lt-LT.rc (original)
+++ trunk/rosapps/applications/screensavers/blankscr/lang/lt-LT.rc Thu Feb 21 00:43:41
2008
@@ -12,6 +12,5 @@
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Tuðèias"
- IDS_TITLE "Apie"
IDS_TEXT "Nëra keièiamø parametrø."
END
Modified: trunk/rosapps/applications/screensavers/blankscr/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/lang/nl-NL.rc (original)
+++ trunk/rosapps/applications/screensavers/blankscr/lang/nl-NL.rc Thu Feb 21 00:43:41
2008
@@ -3,6 +3,5 @@
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Blank"
- IDS_TITLE "Informatie"
IDS_TEXT "Geen dingen om in te stellen."
END
Modified: trunk/rosapps/applications/screensavers/blankscr/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/lang/pl-PL.rc (original)
+++ trunk/rosapps/applications/screensavers/blankscr/lang/pl-PL.rc Thu Feb 21 00:43:41
2008
@@ -10,6 +10,5 @@
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Puste"
- IDS_TITLE "O programie"
IDS_TEXT "Brak opcji do ustawiania."
END
Modified: trunk/rosapps/applications/screensavers/blankscr/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/lang/sk-SK.rc (original)
+++ trunk/rosapps/applications/screensavers/blankscr/lang/sk-SK.rc Thu Feb 21 00:43:41
2008
@@ -7,6 +7,5 @@
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Blank"
- IDS_TITLE "Èo je ..."
IDS_TEXT "Nie sú potrebné iadne nastavenia."
END
Modified: trunk/rosapps/applications/screensavers/blankscr/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/lang/uk-UA.rc (original)
+++ trunk/rosapps/applications/screensavers/blankscr/lang/uk-UA.rc Thu Feb 21 00:43:41
2008
@@ -11,6 +11,5 @@
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Ïîðîæíüî"
- IDS_TITLE "Ïðî"
IDS_TEXT "Öÿ çàñòàâêà íå ìຠíàëàøòîâóâàíèõ ïàðàìåòð³â."
END
Modified: trunk/rosapps/applications/screensavers/blankscr/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/resource.h (original)
+++ trunk/rosapps/applications/screensavers/blankscr/resource.h Thu Feb 21 00:43:41 2008
@@ -1,4 +1,1 @@
-
-#define IDS_DESCRIPTION 1
-#define IDS_TITLE 2
#define IDS_TEXT 3
Modified: trunk/rosapps/applications/screensavers/blankscr/scrnsave.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/scrnsave.c (original)
+++ trunk/rosapps/applications/screensavers/blankscr/scrnsave.c Thu Feb 21 00:43:41 2008
@@ -21,38 +21,27 @@
#include <scrnsave.h>
#include "resource.h"
-LRESULT WINAPI ScreenSaverProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- static HDC hdc;
- static RECT rc;
-
- switch(message)
- {
- case WM_CREATE:
- break;
- case WM_DESTROY:
- PostQuitMessage(0);
- break;
- case WM_ERASEBKGND:
- hdc = GetDC(hwnd);
- GetClientRect (hwnd, &rc);
- FillRect (hdc, &rc, GetStockObject(BLACK_BRUSH));
- ReleaseDC(hwnd,hdc);
- break;
- case WM_PAINT:
- break;
- default:
- return DefScreenSaverProc(hwnd, message, wParam, lParam);
- }
- return 0;
+LRESULT WINAPI ScreenSaverProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ return DefScreenSaverProc(hwnd, uMsg, wParam, lParam);
}
-BOOL WINAPI ScreenSaverConfigureDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM
lParam)
+BOOL WINAPI ScreenSaverConfigureDialog(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
lParam)
{
return FALSE;
}
+// This function is only called one time before opening the configuration dialog.
+// Use it to show a message that no configuration is necesssary and return FALSE to
indicate that no configuration dialog shall be opened.
BOOL WINAPI RegisterDialogClasses(HANDLE hInst)
{
- return TRUE;
+ TCHAR szMessage[256];
+ TCHAR szTitle[25];
+
+ LoadString(hInst, IDS_TEXT, szMessage, sizeof(szMessage) / sizeof(TCHAR));
+ LoadString(hInst, IDS_DESCRIPTION, szTitle, sizeof(szTitle) / sizeof(TCHAR));
+
+ MessageBox(NULL, szMessage, szTitle, MB_OK | MB_ICONEXCLAMATION);
+
+ return FALSE;
}
Modified: trunk/rosapps/applications/screensavers/blankscr/scrnsave.def
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/scrnsave.def (original)
+++ trunk/rosapps/applications/screensavers/blankscr/scrnsave.def Thu Feb 21 00:43:41
2008
@@ -1,6 +1,4 @@
NAME blankscr.SCR
-
-DESCRIPTION 'Blank screen saver'
EXPORTS
ScreenSaverProc
Modified: trunk/rosapps/applications/screensavers/blankscr/scrnsave.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
==============================================================================
--- trunk/rosapps/applications/screensavers/blankscr/scrnsave.rc (original)
+++ trunk/rosapps/applications/screensavers/blankscr/scrnsave.rc Thu Feb 21 00:43:41 2008
@@ -1,4 +1,5 @@
#include <windows.h>
+#include <scrnsave.h>
#include "resource.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
@@ -7,7 +8,6 @@
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Default ScreenSaver\0"
#define REACTOS_STR_INTERNAL_NAME "scrnsave\0"
#define REACTOS_STR_ORIGINAL_FILENAME "scrnsave.scr\0"
-
#include <reactos/version.rc>
#include "lang/bg-BG.rc"