diff --git a/reactos/base/applications/kbswitch/kbswitch.c b/reactos/base/applications/kbswitch/kbswitch.c index 5d0849d65e6..2fb1a192641 100644 --- a/reactos/base/applications/kbswitch/kbswitch.c +++ b/reactos/base/applications/kbswitch/kbswitch.c @@ -541,7 +541,7 @@ _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPTSTR lpCmdLine, INT nCmdSh hProcessHeap = GetProcessHeap(); WndClass.style = 0; - WndClass.lpfnWndProc = (WNDPROC)WndProc; + WndClass.lpfnWndProc = WndProc; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; WndClass.hInstance = hInstance; diff --git a/reactos/base/applications/notepad/main.c b/reactos/base/applications/notepad/main.c index 9a4daed6656..f62f672ae50 100644 --- a/reactos/base/applications/notepad/main.c +++ b/reactos/base/applications/notepad/main.c @@ -321,7 +321,7 @@ LRESULT CALLBACK EDIT_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) break; } } - return CallWindowProc( (WNDPROC)Globals.EditProc, hWnd, msg, wParam, lParam); + return CallWindowProc( Globals.EditProc, hWnd, msg, wParam, lParam); } /*********************************************************************** diff --git a/reactos/base/applications/regedit/childwnd.c b/reactos/base/applications/regedit/childwnd.c index 3b9e93e677b..b14b8e390df 100644 --- a/reactos/base/applications/regedit/childwnd.c +++ b/reactos/base/applications/regedit/childwnd.c @@ -286,7 +286,7 @@ LRESULT CALLBACK AddressBarProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar { WNDPROC oldwndproc; static WCHAR s_szNode[256]; - oldwndproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(hwnd, GWLP_USERDATA); + oldwndproc = (WNDPROC)GetWindowLongPtr(hwnd, GWLP_USERDATA); switch (uMsg) { @@ -406,7 +406,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa 0); } /* Subclass the AddressBar */ - oldproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(g_pChildWnd->hAddressBarWnd, GWLP_WNDPROC); + oldproc = (WNDPROC)GetWindowLongPtr(g_pChildWnd->hAddressBarWnd, GWLP_WNDPROC); SetWindowLongPtr(g_pChildWnd->hAddressBarWnd, GWLP_USERDATA, (DWORD_PTR)oldproc); SetWindowLongPtr(g_pChildWnd->hAddressBarWnd, GWLP_WNDPROC, (DWORD_PTR)AddressBarProc); break; diff --git a/reactos/base/applications/regedit/edit.c b/reactos/base/applications/regedit/edit.c index 3dc134c3c65..deff3fd9889 100644 --- a/reactos/base/applications/regedit/edit.c +++ b/reactos/base/applications/regedit/edit.c @@ -233,7 +233,7 @@ LRESULT CALLBACK DwordEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPAR { WNDPROC oldwndproc; - oldwndproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(hwnd, GWLP_USERDATA); + oldwndproc = (WNDPROC)GetWindowLongPtr(hwnd, GWLP_USERDATA); switch (uMsg) { @@ -288,7 +288,7 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP /* subclass the edit control */ hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA); - oldproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(hwndValue, GWLP_WNDPROC); + oldproc = (WNDPROC)GetWindowLongPtr(hwndValue, GWLP_WNDPROC); SetWindowLongPtr(hwndValue, GWLP_USERDATA, (DWORD_PTR)oldproc); SetWindowLongPtr(hwndValue, GWLP_WNDPROC, (DWORD_PTR)DwordEditSubclassProc); diff --git a/reactos/base/applications/regedit/hexedit.c b/reactos/base/applications/regedit/hexedit.c index a713d02e63a..8c63ff71a95 100644 --- a/reactos/base/applications/regedit/hexedit.c +++ b/reactos/base/applications/regedit/hexedit.c @@ -62,7 +62,7 @@ static UINT ClipboardFormatID = 0; #define HEHT_ASCIIDUMP (0x6) #define HEHT_RIGHTMARGIN (0x7) -INT_PTR CALLBACK HexEditWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +LRESULT CALLBACK HexEditWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); ATOM WINAPI @@ -75,7 +75,7 @@ RegisterHexEditorClass(HINSTANCE hInstance) ZeroMemory(&WndClass, sizeof(WNDCLASSEXW)); WndClass.cbSize = sizeof(WNDCLASSEXW); WndClass.style = CS_DBLCLKS; - WndClass.lpfnWndProc = (WNDPROC)HexEditWndProc; + WndClass.lpfnWndProc = HexEditWndProc; WndClass.cbWndExtra = sizeof(PHEXEDIT_DATA); WndClass.hInstance = hInstance; WndClass.hCursor = LoadCursorW(NULL, IDC_IBEAM); @@ -1415,13 +1415,13 @@ HEXEDIT_WM_CONTEXTMENU(PHEXEDIT_DATA hed, INT x, INT y) PostMessageW(hed->hWndSelf, WM_NULL, 0, 0); } -INT_PTR CALLBACK +LRESULT CALLBACK HexEditWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { PHEXEDIT_DATA hed; POINTS p; - hed = (PHEXEDIT_DATA)(LONG_PTR)GetWindowLongPtr(hWnd, (DWORD_PTR)0); + hed = (PHEXEDIT_DATA)GetWindowLongPtr(hWnd, (DWORD_PTR)0); switch(uMsg) { case WM_ERASEBKGND: diff --git a/reactos/base/applications/taskmgr/graph.c b/reactos/base/applications/taskmgr/graph.c index 668bc8e38f0..20e0ff45476 100644 --- a/reactos/base/applications/taskmgr/graph.c +++ b/reactos/base/applications/taskmgr/graph.c @@ -126,7 +126,7 @@ Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) /* * We pass on all non-handled messages */ - return CallWindowProcW((WNDPROC)OldGraphWndProc, hWnd, message, wParam, lParam); + return CallWindowProcW(OldGraphWndProc, hWnd, message, wParam, lParam); } void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd) diff --git a/reactos/base/applications/taskmgr/graphctl.c b/reactos/base/applications/taskmgr/graphctl.c index 177cd0eae9c..d7f961c589b 100644 --- a/reactos/base/applications/taskmgr/graphctl.c +++ b/reactos/base/applications/taskmgr/graphctl.c @@ -636,5 +636,5 @@ GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) /* * We pass on all non-handled messages */ - return CallWindowProcW((WNDPROC)OldGraphCtrlWndProc, hWnd, message, wParam, lParam); + return CallWindowProcW(OldGraphCtrlWndProc, hWnd, message, wParam, lParam); } diff --git a/reactos/base/applications/taskmgr/perfpage.c b/reactos/base/applications/taskmgr/perfpage.c index 5aaba2bc5eb..b6753127ebd 100644 --- a/reactos/base/applications/taskmgr/perfpage.c +++ b/reactos/base/applications/taskmgr/perfpage.c @@ -197,9 +197,9 @@ PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) /* * Subclass graph buttons */ - OldGraphWndProc = (WNDPROC)(LONG_PTR) SetWindowLongPtrW(hPerformancePageCpuUsageGraph, GWLP_WNDPROC, (LONG_PTR)Graph_WndProc); + OldGraphWndProc = (WNDPROC)SetWindowLongPtrW(hPerformancePageCpuUsageGraph, GWLP_WNDPROC, (LONG_PTR)Graph_WndProc); SetWindowLongPtrW(hPerformancePageMemUsageGraph, GWLP_WNDPROC, (LONG_PTR)Graph_WndProc); - OldGraphCtrlWndProc = (WNDPROC)(LONG_PTR) SetWindowLongPtrW(hPerformancePageMemUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc); + OldGraphCtrlWndProc = (WNDPROC)SetWindowLongPtrW(hPerformancePageMemUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc); SetWindowLongPtrW(hPerformancePageCpuUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc); return TRUE; diff --git a/reactos/base/applications/taskmgr/procpage.c b/reactos/base/applications/taskmgr/procpage.c index 830f83e3cfe..40739e31f5b 100644 --- a/reactos/base/applications/taskmgr/procpage.c +++ b/reactos/base/applications/taskmgr/procpage.c @@ -141,7 +141,7 @@ ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) /* * Subclass the process list control so we can intercept WM_ERASEBKGND */ - OldProcessListWndProc = (WNDPROC)(LONG_PTR) SetWindowLongPtrW(hProcessPageListCtrl, GWLP_WNDPROC, (LONG_PTR)ProcessListWndProc); + OldProcessListWndProc = (WNDPROC)SetWindowLongPtrW(hProcessPageListCtrl, GWLP_WNDPROC, (LONG_PTR)ProcessListWndProc); #ifdef RUN_PROC_PAGE /* Start our refresh thread */