regedit: simpler about dialog

Dimitrie O. Paun dpaun at rogers.com
Tue Jan 13 23:25:54 CST 2004


This is from ReactOS tree.

ChangeLog
    weiden at mok.lvcm.com
    Simplify the About dialog code.

Index: programs/regedit/Makefile.in
===================================================================
RCS file: /var/cvs/wine/programs/regedit/Makefile.in,v
retrieving revision 1.14
diff -u -r1.14 Makefile.in
--- programs/regedit/Makefile.in	3 Dec 2003 22:29:05 -0000	1.14
+++ programs/regedit/Makefile.in	14 Jan 2004 05:18:15 -0000
@@ -5,7 +5,7 @@
 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
 
Index: programs/regedit/about.c
===================================================================
RCS file: /var/cvs/wine/programs/regedit/about.c,v
retrieving revision 1.2
diff -u -r1.2 about.c
--- programs/regedit/about.c	12 Dec 2003 04:08:59 -0000	1.2
+++ programs/regedit/about.c	14 Jan 2004 05:15:24 -0000
@@ -21,33 +21,12 @@
 #define WIN32_LEAN_AND_MEAN     /* Exclude rarely-used stuff from Windows headers */
 #include <windows.h>
 #include <commctrl.h>
-#include <stdlib.h>
+#include <shellapi.h>
 #include <tchar.h>
-#include <process.h>
-#include <stdio.h>
 
 #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)));
 }


-- 
Dimi.




More information about the wine-patches mailing list