Remove some hardcode strings

to En.rc

svn path=/trunk/; revision=14917
This commit is contained in:
Magnus Olsen 2005-05-01 17:32:09 +00:00
parent 7a4df43bd1
commit 62bf02deb7
4 changed files with 32 additions and 3 deletions

View file

@ -0,0 +1,13 @@
#include "resource.h"
/*
* Moved all hardcoded strings to En.rc.
* By Magnus Olsen 2005
*/
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
STRING_WelcomeMsg, "ReactOS Virtual DOS Machine support.\n"
STRING_PromptMsg, "Type r<cr> to run, s<cr> to shutdown or q<cr> to quit now."
}

View file

@ -15,6 +15,7 @@
#include <windows.h>
#include <stdio.h>
#include <wchar.h>
#include "resource.h"
#define NDEBUG
#include <debug.h>
@ -205,6 +206,7 @@ CreateVDM(PVDM_CONTROL_BLOCK vdm)
SYSTEM_INFO inf;
MEMORYSTATUS stat;
GlobalMemoryStatus(&stat);
if (stat.dwLength != sizeof(MEMORYSTATUS)) {
printf("WARNING: GlobalMemoryStatus() returned unknown structure version, size %ld, expected %d.\n", stat.dwLength, sizeof(stat));
@ -223,6 +225,7 @@ CreateVDM(PVDM_CONTROL_BLOCK vdm)
//SetLastError();
return FALSE;
}
}
GetSystemInfo(&inf);
@ -273,10 +276,13 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho
ULONG i;
BOOL vdmStarted = FALSE;
WCHAR WelcomeMsg[] = L"ReactOS Virtual DOS Machine support.\n";
WCHAR PromptMsg[] = L"Type r<cr> to run, s<cr> to shutdown or q<cr> to quit now.";
TCHAR WelcomeMsg[RC_STRING_MAX_SIZE];
TCHAR PromptMsg[RC_STRING_MAX_SIZE];
CHAR InputBuffer[255];
LoadString( GetModuleHandle(NULL), STRING_WelcomeMsg, WelcomeMsg,sizeof(WelcomeMsg));
LoadString( GetModuleHandle(NULL), STRING_PromptMsg, PromptMsg ,sizeof(PromptMsg));
AllocConsole();
SetConsoleTitleW(L"ntvdm");

View file

@ -1,6 +1,10 @@
/* $Id$ */
#include <windows.h>
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Virtual DOS Machine\0"
#define REACTOS_STR_INTERNAL_NAME "ntvdm\0"
#define REACTOS_STR_ORIGINAL_FILENAME "ntvdm.exe\0"
#include <reactos/version.rc>
#include "En.rc"

View file

@ -0,0 +1,6 @@
#define RC_STRING_MAX_SIZE 2048
#define STRING_WelcomeMsg 100
#define STRING_PromptMsg 101
/* EOF */