From 8461c770822ae22f588888b987824a488753424d Mon Sep 17 00:00:00 2001 From: Thomas Weidenmueller Date: Fri, 16 Jan 2004 01:58:48 +0000 Subject: [PATCH] Simplify the About dialog code. --- programs/regedit/Makefile.in | 2 +- programs/regedit/about.c | 25 ++----------------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/programs/regedit/Makefile.in b/programs/regedit/Makefile.in index 46be125b603..9d97108136c 100644 --- a/programs/regedit/Makefile.in +++ b/programs/regedit/Makefile.in @@ -5,7 +5,7 @@ VPATH = @srcdir@ MODULE = regedit.exe APPMODE = gui IMPORTS = msvcrt advapi32 kernel32 -DELAYIMPORTS = comdlg32 comctl32 user32 gdi32 +DELAYIMPORTS = shell32 comdlg32 comctl32 user32 gdi32 EXTRAINCL = -I$(TOPSRCDIR)/include/msvcrt EXTRADEFS = -DNO_LIBWINE_PORT diff --git a/programs/regedit/about.c b/programs/regedit/about.c index fd3238feead..c8e23840132 100644 --- a/programs/regedit/about.c +++ b/programs/regedit/about.c @@ -21,33 +21,12 @@ #define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ #include #include -#include +#include #include -#include -#include #include "main.h" -static INT_PTR CALLBACK AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) -{ - TCHAR strLicense[0x1000]; - - switch (message) { - case WM_INITDIALOG: - LoadString(hInst, IDS_LICENSE, strLicense, COUNT_OF(strLicense)); - SetDlgItemText(hDlg, IDC_LICENSE_EDIT, strLicense); - return TRUE; - case WM_COMMAND: - if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL)) { - EndDialog(hDlg, LOWORD(wParam)); - return TRUE; - } - break; - } - return 0; -} - void ShowAboutBox(HWND hWnd) { - DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, AboutDialogWndProc); + ShellAbout(hWnd, _T("Registry Explorer"), _T(""), LoadIcon(hInst, MAKEINTRESOURCE(IDI_REGEDIT))); }