From e2ba765506202623d5668c1c1e58c9e3d6727c7e Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Mon, 17 Apr 2006 13:35:40 +0000 Subject: [PATCH] Bit of fun. Add a built-in coded message for the first time the screensaver is run. If removed, it will not reappear. svn path=/trunk/; revision=21635 --- reactos/base/applications/screensavers/matrix/config.c | 2 +- reactos/base/applications/screensavers/matrix/settings.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/reactos/base/applications/screensavers/matrix/config.c b/reactos/base/applications/screensavers/matrix/config.c index 288c9f127c5..a8c833c7daa 100644 --- a/reactos/base/applications/screensavers/matrix/config.c +++ b/reactos/base/applications/screensavers/matrix/config.c @@ -68,7 +68,7 @@ BOOL CALLBACK ConfigDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) prevheight = GetSystemMetrics(SM_CYSCREEN) / GLYPH_HEIGHT + 1; //Add any saved messages to the combo box - for(index = 0; index < g_nNumMessages; index++) + for(index = 0; index <= g_nNumMessages; index++) { if(lstrlen(g_szMessages[index]) > 0) SendDlgItemMessage(hwnd, IDC_COMBO1, CB_ADDSTRING, 0, (LPARAM)g_szMessages[index]); diff --git a/reactos/base/applications/screensavers/matrix/settings.c b/reactos/base/applications/screensavers/matrix/settings.c index fb9648488db..a274263e43f 100644 --- a/reactos/base/applications/screensavers/matrix/settings.c +++ b/reactos/base/applications/screensavers/matrix/settings.c @@ -93,6 +93,11 @@ void LoadSettings() } } } + else + { + /* built-in coded message for first run */ + lstrcpyn(g_szMessages[0], "ReactOS", MAXMSG_LENGTH); + } RegCloseKey(hkey); free(hugechar);