Author: ekohl
Date: Sat Sep 22 15:20:25 2007
New Revision: 29136
URL:
http://svn.reactos.org/svn/reactos?rev=29136&view=rev
Log:
Don't use hardcoded strings in the configuration message box. Use string resources
instead.
Added:
trunk/reactos/base/applications/screensavers/cylfrac/lang/ (with props)
trunk/reactos/base/applications/screensavers/cylfrac/lang/en-US.rc (with props)
Modified:
trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c
trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.rc
trunk/reactos/base/applications/screensavers/cylfrac/resource.h
Modified: trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c (original)
+++ trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c Sat Sep 22 15:20:25
2007
@@ -21,6 +21,7 @@
#include <GL/gl.h>
#include <GL/glu.h>
#include <tchar.h>
+#include "resource.h"
#define APPNAME _T("Cylfrac")
#define wfactor 0.9
@@ -272,6 +273,27 @@
*hwndParent = 0;
}
+void Configure(void)
+{
+ TCHAR szTitle[256];
+ TCHAR szText[256];
+
+ LoadString(hInstance,
+ IDS_TITLE,
+ szTitle,
+ 256);
+
+ LoadString(hInstance,
+ IDS_TEXT,
+ szText,
+ 256);
+
+ MessageBox(0,
+ szText,
+ szTitle,
+ MB_OK | MB_ICONWARNING);
+}
+
int WINAPI WinMain (HINSTANCE hInst,
HINSTANCE hPrev,
LPSTR lpCmdLine,
@@ -297,10 +319,7 @@
case 'c':
default:
- MessageBox(0,
- _T("Cylinders fractal by unC0Rr.\nSpecial for ReactOS.\n"),
- _T("About"),
- MB_OK | MB_ICONINFORMATION);
+ Configure();
return 0;
}
Modified: trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.rc (original)
+++ trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.rc Sat Sep 22 15:20:25
2007
@@ -10,10 +10,4 @@
#include <reactos/version.rc>
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_DESCRIPTION "Cylinders fractal"
-END
+#include "lang/en-US.rc"
Propchange: trunk/reactos/base/applications/screensavers/cylfrac/lang/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Sep 22 15:20:25 2007
@@ -1,0 +1,7 @@
+GNUmakefile
+*.vcproj
+*.user
+*.cbp
+*.ncb
+*.suo
+*.sln
Added: trunk/reactos/base/applications/screensavers/cylfrac/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/cylfrac/lang/en-US.rc (added)
+++ trunk/reactos/base/applications/screensavers/cylfrac/lang/en-US.rc Sat Sep 22 15:20:25
2007
@@ -1,0 +1,8 @@
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_DESCRIPTION "Cylinders fractal"
+ IDS_TITLE "About"
+ IDS_TEXT "Cylinders fractal by unC0Rr.\nSpecial for ReactOS."
+END
Propchange: trunk/reactos/base/applications/screensavers/cylfrac/lang/en-US.rc
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/base/applications/screensavers/cylfrac/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/cylfrac/resource.h (original)
+++ trunk/reactos/base/applications/screensavers/cylfrac/resource.h Sat Sep 22 15:20:25
2007
@@ -1,2 +1,4 @@
-#define IDS_DESCRIPTION 1
+#define IDS_DESCRIPTION 1
+#define IDS_TITLE 2
+#define IDS_TEXT 3