Don't use hardcoded strings in the configuration message box. Use string resources instead.

svn path=/trunk/; revision=29137
This commit is contained in:
Eric Kohl 2007-09-22 11:26:03 +00:00
parent 761e858982
commit 847464262c
4 changed files with 35 additions and 12 deletions

View file

@ -0,0 +1,8 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Starfield ScreenSaver"
IDS_TITLE "About"
IDS_TEXT "No options need to be set."
END

View file

@ -1 +1,4 @@
#define IDS_DESCRIPTION 1
#define IDS_DESCRIPTION 1
#define IDS_TITLE 2
#define IDS_TEXT 3

View file

@ -315,6 +315,27 @@ void ParseCommandLine(PSTR szCmdLine, int *chOption, HWND *hwndParent)
*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,
@ -343,10 +364,7 @@ int WINAPI WinMain (HINSTANCE hInst,
case 'c':
default:
MessageBox(0,
_T("No options need to be set."),
_T("About"),
MB_OK | MB_ICONWARNING);
Configure();
return 0;
}

View file

@ -10,10 +10,4 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#include <reactos/version.rc>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE DISCARDABLE
BEGIN
IDS_DESCRIPTION "Starfield ScreenSaver"
END
#include "lang/en-US.rc"