1 /*
2  *  Copyright 2003 J Brown
3  *  Copyright 2006 Eric Kohl
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18  */
19 
20 #include <windows.h>
21 #include <scrnsave.h>
22 #include "resource.h"
23 
ScreenSaverProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)24 LRESULT WINAPI ScreenSaverProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
25 {
26     return DefScreenSaverProc(hwnd, uMsg, wParam, lParam);
27 }
28 
ScreenSaverConfigureDialog(HWND hDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)29 BOOL WINAPI ScreenSaverConfigureDialog(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
30 {
31     return FALSE;
32 }
33 
34 // This function is only called one time before opening the configuration dialog.
35 // Use it to show a message that no configuration is necesssary and return FALSE to indicate that no configuration dialog shall be opened.
RegisterDialogClasses(HANDLE hInst)36 BOOL WINAPI RegisterDialogClasses(HANDLE hInst)
37 {
38     TCHAR szMessage[256];
39     TCHAR szTitle[25];
40 
41     LoadString(hInst, IDS_TEXT, szMessage, sizeof(szMessage) / sizeof(TCHAR));
42     LoadString(hInst, IDS_DESCRIPTION, szTitle, sizeof(szTitle) / sizeof(TCHAR));
43 
44     MessageBox(NULL, szMessage, szTitle, MB_OK | MB_ICONEXCLAMATION);
45 
46     return FALSE;
47 }
48