[CPL] Remove unnecessary DLGPROC casts.
authorThomas Faber <thomas.faber@reactos.org>
Mon, 30 Oct 2017 23:37:37 +0000 (00:37 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Fri, 3 Nov 2017 12:57:44 +0000 (13:57 +0100)
14 files changed:
dll/cpl/access/access.c
dll/cpl/access/display.c
dll/cpl/access/general.c
dll/cpl/access/keyboard.c
dll/cpl/access/mouse.c
dll/cpl/powercfg/powercfg.c
dll/cpl/sysdm/advanced.c
dll/cpl/sysdm/hardprof.c
dll/cpl/sysdm/hardware.c
dll/cpl/sysdm/sysdm.c
dll/cpl/timedate/timedate.c
dll/cpl/usrmgr/groupprops.c
dll/cpl/usrmgr/userprops.c
dll/cpl/usrmgr/usrmgr.c

index efd6195..9bd028c 100644 (file)
@@ -200,11 +200,11 @@ SystemApplet(VOID)
     psh.nStartPage = 0;
     psh.ppsp = psp;
 
-    InitPropSheetPage(&psp[0], IDD_PROPPAGEKEYBOARD, (DLGPROC)KeyboardPageProc, pGlobalData);
-    InitPropSheetPage(&psp[1], IDD_PROPPAGESOUND, (DLGPROC)SoundPageProc, pGlobalData);
-    InitPropSheetPage(&psp[2], IDD_PROPPAGEDISPLAY, (DLGPROC)DisplayPageProc, pGlobalData);
-    InitPropSheetPage(&psp[3], IDD_PROPPAGEMOUSE, (DLGPROC)MousePageProc, pGlobalData);
-    InitPropSheetPage(&psp[4], IDD_PROPPAGEGENERAL, (DLGPROC)GeneralPageProc, pGlobalData);
+    InitPropSheetPage(&psp[0], IDD_PROPPAGEKEYBOARD, KeyboardPageProc, pGlobalData);
+    InitPropSheetPage(&psp[1], IDD_PROPPAGESOUND, SoundPageProc, pGlobalData);
+    InitPropSheetPage(&psp[2], IDD_PROPPAGEDISPLAY, DisplayPageProc, pGlobalData);
+    InitPropSheetPage(&psp[3], IDD_PROPPAGEMOUSE, MousePageProc, pGlobalData);
+    InitPropSheetPage(&psp[4], IDD_PROPPAGEGENERAL, GeneralPageProc, pGlobalData);
 
     ret = PropertySheet(&psh);
 
index 4f8bc16..05e88f1 100644 (file)
@@ -179,7 +179,7 @@ DisplayPageProc(HWND hwndDlg,
                     if (DialogBoxParam(hApplet,
                                        MAKEINTRESOURCE(IDD_CONTRASTOPTIONS),
                                        hwndDlg,
-                                       (DLGPROC)HighContrastDlgProc,
+                                       HighContrastDlgProc,
                                        (LPARAM)pGlobalData))
                         PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                     break;
index 8b1742a..414b930 100644 (file)
@@ -257,7 +257,7 @@ GeneralPageProc(HWND hwndDlg,
                     if (DialogBoxParam(hApplet,
                                        MAKEINTRESOURCE(IDD_SERIALKEYSOPTIONS),
                                        hwndDlg,
-                                       (DLGPROC)SerialKeysDlgProc,
+                                       SerialKeysDlgProc,
                                        (LPARAM)pGlobalData))
                         PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                     break;
index f5953c4..a796242 100644 (file)
@@ -467,7 +467,7 @@ FilterKeysDlgProc(HWND hwndDlg,
                     DialogBoxParam(hApplet,
                                    MAKEINTRESOURCE(IDD_BOUNCEKEYSOPTIONS),
                                    hwndDlg,
-                                   (DLGPROC)BounceKeysDlgProc,
+                                   BounceKeysDlgProc,
                                    (LPARAM)pGlobalData);
                     break;
 
@@ -492,7 +492,7 @@ FilterKeysDlgProc(HWND hwndDlg,
                     DialogBoxParam(hApplet,
                                    MAKEINTRESOURCE(IDD_REPEATKEYSOPTIONS),
                                    hwndDlg,
-                                   (DLGPROC)RepeatKeysDlgProc,
+                                   RepeatKeysDlgProc,
                                    (LPARAM)pGlobalData);
                     break;
 
@@ -621,7 +621,7 @@ KeyboardPageProc(HWND hwndDlg,
                     if (DialogBoxParam(hApplet,
                                        MAKEINTRESOURCE(IDD_STICKYKEYSOPTIONS),
                                        hwndDlg,
-                                       (DLGPROC)StickyKeysDlgProc,
+                                       StickyKeysDlgProc,
                                        (LPARAM)pGlobalData))
                         PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                     break;
@@ -635,7 +635,7 @@ KeyboardPageProc(HWND hwndDlg,
                     if (DialogBoxParam(hApplet,
                                        MAKEINTRESOURCE(IDD_FILTERKEYSOPTIONS),
                                        hwndDlg,
-                                       (DLGPROC)FilterKeysDlgProc,
+                                       FilterKeysDlgProc,
                                        (LPARAM)pGlobalData))
                         PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                     break;
@@ -649,7 +649,7 @@ KeyboardPageProc(HWND hwndDlg,
                     if (DialogBoxParam(hApplet,
                                        MAKEINTRESOURCE(IDD_TOGGLEKEYSOPTIONS),
                                        hwndDlg,
-                                       (DLGPROC)ToggleKeysDlgProc,
+                                       ToggleKeysDlgProc,
                                        (LPARAM)pGlobalData))
                         PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                     break;
index 81f1e3b..a81d947 100644 (file)
@@ -177,7 +177,7 @@ MousePageProc(HWND hwndDlg,
                     if (DialogBoxParam(hApplet,
                                        MAKEINTRESOURCE(IDD_MOUSEKEYSOPTIONS),
                                        hwndDlg,
-                                       (DLGPROC)MouseKeysDlgProc,
+                                       MouseKeysDlgProc,
                                        (LPARAM)pGlobalData))
                         PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                     break;
index 9952f84..fd820cc 100644 (file)
@@ -97,16 +97,16 @@ Applet1(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
   psh.nStartPage = 0;
   psh.phpage = hpsp;
 
-  InitPropSheetPage(&psh, IDD_PROPPAGEPOWERSCHEMES, (DLGPROC)PowerSchemesDlgProc);
+  InitPropSheetPage(&psh, IDD_PROPPAGEPOWERSCHEMES, PowerSchemesDlgProc);
   if (GetPwrCapabilities(&spc))
   {
     if (spc.SystemBatteriesPresent)
     {
-      InitPropSheetPage(&psh, IDD_PROPPAGEALARMS, (DLGPROC)AlarmsDlgProc);
+      InitPropSheetPage(&psh, IDD_PROPPAGEALARMS, AlarmsDlgProc);
     }
   }
-  InitPropSheetPage(&psh, IDD_PROPPAGEADVANCED, (DLGPROC)AdvancedDlgProc);
-  InitPropSheetPage(&psh, IDD_PROPPAGEHIBERNATE, (DLGPROC)HibernateDlgProc);
+  InitPropSheetPage(&psh, IDD_PROPPAGEADVANCED, AdvancedDlgProc);
+  InitPropSheetPage(&psh, IDD_PROPPAGEHIBERNATE, HibernateDlgProc);
 
   /* Load additional pages provided by shell extensions */
   hpsxa = SHCreatePropSheetExtArray(HKEY_LOCAL_MACHINE, REGSTR_PATH_CONTROLSFOLDER TEXT("\\Power"), MAX_POWER_PAGES - psh.nPages);
index 8736672..ffa1e05 100644 (file)
@@ -134,35 +134,35 @@ AdvancedPageProc(HWND hwndDlg,
                     DialogBox(hApplet,
                               MAKEINTRESOURCE(IDD_VIRTMEM),
                               hwndDlg,
-                              (DLGPROC)VirtMemDlgProc);
+                              VirtMemDlgProc);
                     break;
 
                 case IDC_USERPROFILE:
                     DialogBox(hApplet,
                               MAKEINTRESOURCE(IDD_USERPROFILE),
                               hwndDlg,
-                              (DLGPROC)UserProfileDlgProc);
+                              UserProfileDlgProc);
                     break;
 
                 case IDC_STAREC:
                     DialogBox(hApplet,
                               MAKEINTRESOURCE(IDD_STARTUPRECOVERY),
                               hwndDlg,
-                              (DLGPROC)StartRecDlgProc);
+                              StartRecDlgProc);
                     break;
 
                 case IDC_SYSSETTINGS:
                     DialogBox(hApplet,
                               MAKEINTRESOURCE(IDD_SYSSETTINGS),
                               hwndDlg,
-                              (DLGPROC)SysSettingsDlgProc);
+                              SysSettingsDlgProc);
                     break;
 
                 case IDC_ENVVAR:
                     DialogBox(hApplet,
                               MAKEINTRESOURCE(IDD_ENVIRONMENT_VARIABLES),
                               hwndDlg,
-                              (DLGPROC)EnvironmentDlgProc);
+                              EnvironmentDlgProc);
                     break;
 
                 case IDC_ERRORREPORT:
index 2a47ec3..7d8c633 100644 (file)
@@ -163,7 +163,7 @@ CopyHardwareProfile(
     if (DialogBoxParam(hApplet,
                        MAKEINTRESOURCE(IDD_COPYPROFILE),
                        hwndDlg,
-                       (DLGPROC)CopyProfileDlgProc,
+                       CopyProfileDlgProc,
                        (LPARAM)&ProfileNames) != IDOK)
         return;
 
@@ -280,7 +280,7 @@ RenameHardwareProfile(
     if (DialogBoxParam(hApplet,
                        MAKEINTRESOURCE(IDD_RENAMEPROFILE),
                        hwndDlg,
-                       (DLGPROC)RenameProfileDlgProc,
+                       RenameProfileDlgProc,
                        (LPARAM)&ProfileNames) != IDOK)
         return;
 
index 5e628e8..3211b4e 100644 (file)
@@ -95,7 +95,7 @@ HardwarePageProc(HWND hwndDlg,
                     DialogBox(hApplet,
                               MAKEINTRESOURCE(IDD_HARDWAREPROFILES),
                               hwndDlg,
-                              (DLGPROC)HardProfDlgProc);
+                              HardProfDlgProc);
                     return TRUE;
             }
             break;
index 64b489f..36bd5f5 100644 (file)
@@ -147,10 +147,10 @@ SystemApplet(VOID)
     psh.phpage = hpsp;
     psh.pfnCallback = NULL;
 
-    InitPropSheetPage(&psh, IDD_PROPPAGEGENERAL, (DLGPROC) GeneralPageProc);
+    InitPropSheetPage(&psh, IDD_PROPPAGEGENERAL, GeneralPageProc);
     hNetIdDll = AddNetIdPage(&psh);
-    InitPropSheetPage(&psh, IDD_PROPPAGEHARDWARE, (DLGPROC) HardwarePageProc);
-    InitPropSheetPage(&psh, IDD_PROPPAGEADVANCED, (DLGPROC) AdvancedPageProc);
+    InitPropSheetPage(&psh, IDD_PROPPAGEHARDWARE, HardwarePageProc);
+    InitPropSheetPage(&psh, IDD_PROPPAGEADVANCED, AdvancedPageProc);
 
     /* Load additional pages provided by shell extensions */
     hpsxa = SHCreatePropSheetExtArray(HKEY_LOCAL_MACHINE, REGSTR_PATH_CONTROLSFOLDER TEXT("\\System"), MAX_SYSTEM_PAGES - psh.nPages);
index f19882c..3bf0d7e 100644 (file)
@@ -96,9 +96,9 @@ Applet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
         psh.nStartPage = 0;
         psh.ppsp = psp;
 
-        InitPropSheetPage(&psp[0], IDD_DATETIMEPAGE, (DLGPROC) DateTimePageProc);
-        InitPropSheetPage(&psp[1], IDD_TIMEZONEPAGE, (DLGPROC) TimeZonePageProc);
-        InitPropSheetPage(&psp[2], IDD_INETTIMEPAGE, (DLGPROC) InetTimePageProc);
+        InitPropSheetPage(&psp[0], IDD_DATETIMEPAGE, DateTimePageProc);
+        InitPropSheetPage(&psp[1], IDD_TIMEZONEPAGE, TimeZonePageProc);
+        InitPropSheetPage(&psp[2], IDD_INETTIMEPAGE, InetTimePageProc);
 
         Ret = (LONG)(PropertySheetW(&psh) != -1);
 
index dd9c19a..e9be4f6 100644 (file)
@@ -638,7 +638,7 @@ GroupProperties(HWND hwndDlg)
     psh.nStartPage = 0;
     psh.ppsp = psp;
 
-    InitPropSheetPage(&psp[0], IDD_GROUP_GENERAL, (DLGPROC)GroupGeneralPageProc, szGroupName);
+    InitPropSheetPage(&psp[0], IDD_GROUP_GENERAL, GroupGeneralPageProc, szGroupName);
 
     return (PropertySheet(&psh) == IDOK);
 }
index e49ea25..fd76a91 100644 (file)
@@ -928,9 +928,9 @@ UserProperties(HWND hwndDlg)
     psh.nStartPage = 0;
     psh.ppsp = psp;
 
-    InitPropSheetPage(&psp[0], IDD_USER_GENERAL, (DLGPROC)UserGeneralPageProc, szUserName);
-    InitPropSheetPage(&psp[1], IDD_USER_MEMBERSHIP, (DLGPROC)UserMembershipPageProc, szUserName);
-    InitPropSheetPage(&psp[2], IDD_USER_PROFILE, (DLGPROC)UserProfilePageProc, szUserName);
+    InitPropSheetPage(&psp[0], IDD_USER_GENERAL, UserGeneralPageProc, szUserName);
+    InitPropSheetPage(&psp[1], IDD_USER_MEMBERSHIP, UserMembershipPageProc, szUserName);
+    InitPropSheetPage(&psp[2], IDD_USER_PROFILE, UserProfilePageProc, szUserName);
 
     return (PropertySheet(&psh) == IDOK);
 }
index 2668e18..81b57df 100644 (file)
@@ -64,9 +64,9 @@ UsrmgrApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
     psh.nStartPage = 0;
     psh.ppsp = psp;
 
-    InitPropSheetPage(&psp[0], IDD_USERS, (DLGPROC)UsersPageProc);
-    InitPropSheetPage(&psp[1], IDD_GROUPS, (DLGPROC)GroupsPageProc);
-    InitPropSheetPage(&psp[2], IDD_EXTRA, (DLGPROC)ExtraPageProc);
+    InitPropSheetPage(&psp[0], IDD_USERS, UsersPageProc);
+    InitPropSheetPage(&psp[1], IDD_GROUPS, GroupsPageProc);
+    InitPropSheetPage(&psp[2], IDD_EXTRA, ExtraPageProc);
 
     return (LONG)(PropertySheet(&psh) != -1);
 }