1 /* 2 * ReactOS About Dialog Box 3 * 4 * Copyright (C) 2002 Robert Dickenson <robd@reactos.org> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 */ 20 21 #ifdef _MSC_VER 22 #include "stdafx.h" 23 #else 24 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 25 #include <windows.h> 26 #include <commctrl.h> 27 #include <stdlib.h> 28 #include <malloc.h> 29 #include <memory.h> 30 #include <tchar.h> 31 #include <process.h> 32 #include <stdio.h> 33 #endif 34 35 #include "main.h" 36 #include "about.h" 37 38 39 extern HINSTANCE hInst; 40 41 42 INT_PTR CALLBACK AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 43 { 44 HWND hLicenseEditWnd; 45 TCHAR strLicense[0x1000]; 46 47 switch (message) { 48 case WM_INITDIALOG: 49 hLicenseEditWnd = GetDlgItem(hDlg, IDC_LICENSE_EDIT); 50 LoadString(hInst, IDS_LICENSE, strLicense, 0x1000); 51 SetWindowText(hLicenseEditWnd, strLicense); 52 return TRUE; 53 case WM_COMMAND: 54 if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL)) { 55 EndDialog(hDlg, LOWORD(wParam)); 56 return TRUE; 57 } 58 break; 59 } 60 return 0; 61 } 62 63 void ShowAboutBox(HWND hWnd) 64 { 65 DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, AboutDialogWndProc); 66 } 67 68