[ros-diffs] [greatlrd] 14888: Remove all hardcode string to En.rc

greatlrd at svn.reactos.com greatlrd at svn.reactos.com
Sat Apr 30 21:00:48 CEST 2005


Remove all hardcode string to En.rc 
Hopplyfull all hardcoing string are gone now
Added: trunk/reactos/subsys/system/userinit/En.rc
Modified: trunk/reactos/subsys/system/userinit/userinit.c
Modified: trunk/reactos/subsys/system/userinit/userinit.rc
  _____  

Added: trunk/reactos/subsys/system/userinit/En.rc
--- trunk/reactos/subsys/system/userinit/En.rc	2005-04-30 18:55:44 UTC
(rev 14887)
+++ trunk/reactos/subsys/system/userinit/En.rc	2005-04-30 19:00:46 UTC
(rev 14888)
@@ -0,0 +1,12 @@

+#include "resource.h"
+/* Start move all hard code string to En.rc 
+ * By Magnus Olsen  2005
+ */
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+STRINGTABLE DISCARDABLE
+{
+
+STRING_USERINIT_FAIL, "Userinit failed to start the shell!\n"
+
+}
  _____  

Modified: trunk/reactos/subsys/system/userinit/userinit.c
--- trunk/reactos/subsys/system/userinit/userinit.c	2005-04-30
18:55:44 UTC (rev 14887)
+++ trunk/reactos/subsys/system/userinit/userinit.c	2005-04-30
19:00:46 UTC (rev 14888)
@@ -24,6 +24,7 @@

  * PROGRAMMERS: Thomas Weidenmueller (w3seek at users.sourceforge.net)
  */
 #include <windows.h>
+#include "resource.h"
 
 
 /* GLOBALS
******************************************************************/
@@ -77,6 +78,7 @@
   PROCESS_INFORMATION pi;
   WCHAR Shell[MAX_PATH];
   WCHAR ExpandedShell[MAX_PATH];
+  TCHAR szMsg[RC_STRING_MAX_SIZE];
   
   GetShell(Shell);
   
@@ -102,7 +104,10 @@
     CloseHandle(pi.hThread);
   }
   else
-    MessageBox(0, L"Userinit failed to start the shell!\n", NULL, 0);
+  {
+   LoadString( GetModuleHandle(NULL), STRING_USERINIT_FAIL, (LPTSTR)
szMsg,sizeof(szMsg));
+   MessageBox(0, szMsg, NULL, 0);
+  }
 }
 
 static
  _____  

Modified: trunk/reactos/subsys/system/userinit/userinit.rc
--- trunk/reactos/subsys/system/userinit/userinit.rc	2005-04-30
18:55:44 UTC (rev 14887)
+++ trunk/reactos/subsys/system/userinit/userinit.rc	2005-04-30
19:00:46 UTC (rev 14888)
@@ -1,6 +1,9 @@

 /* $Id$ */
+#include <windows.h>
 
 #define REACTOS_STR_FILE_DESCRIPTION	"Userinit Logon Application\0"
 #define REACTOS_STR_INTERNAL_NAME	"userinit\0"
 #define REACTOS_STR_ORIGINAL_FILENAME	"userinit.dll\0"
 #include <reactos/version.rc>
+#include "En.rc"
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050430/064312b8/attachment.html


More information about the Ros-diffs mailing list