Alexandre Julliard : user32: Return INT_PTR instead of LRESULT in dialog procedures.
Alexandre Julliard
julliard at winehq.org
Tue Oct 19 16:07:47 CDT 2021
Module: wine
Branch: master
Commit: 7637e49c448dc0431f9497d0f6ed9854814e8ced
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7637e49c448dc0431f9497d0f6ed9854814e8ced
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Oct 18 16:42:25 2021 +0200
user32: Return INT_PTR instead of LRESULT in dialog procedures.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/tests/dialog.c | 2 +-
dlls/user32/tests/msg.c | 6 +++---
dlls/user32/winproc.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c
index fcfaf5c12d6..4b1336b62c5 100644
--- a/dlls/user32/tests/dialog.c
+++ b/dlls/user32/tests/dialog.c
@@ -488,7 +488,7 @@ static LRESULT CALLBACK main_window_procA (HWND hwnd, UINT uiMsg, WPARAM wParam,
return DefWindowProcA (hwnd, uiMsg, wParam, lParam);
}
-static LRESULT CALLBACK disabled_test_proc (HWND hwnd, UINT uiMsg,
+static INT_PTR CALLBACK disabled_test_proc (HWND hwnd, UINT uiMsg,
WPARAM wParam, LPARAM lParam)
{
switch (uiMsg)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 43253953a9e..4b2495f4197 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -10110,7 +10110,7 @@ static LRESULT WINAPI ParentMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam
return message == WM_COMPAREITEM ? -1 : ret;
}
-static INT_PTR CALLBACK StopQuitMsgCheckProcA(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
+static LRESULT CALLBACK StopQuitMsgCheckProcA(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
{
if (message == WM_CREATE)
PostMessageA(hwnd, WM_CLOSE, 0, 0);
@@ -14381,7 +14381,7 @@ static void test_dialog_messages(void)
cls.lpszClassName = "MyDialogClass";
cls.hInstance = GetModuleHandleA(NULL);
/* need a cast since a dlgproc is used as a wndproc */
- cls.lpfnWndProc = test_dlg_proc;
+ cls.lpfnWndProc = (WNDPROC)test_dlg_proc;
if (!RegisterClassA(&cls)) assert(0);
SetFocus(0);
@@ -14534,7 +14534,7 @@ static void test_EndDialog(void)
ok(GetClassInfoA(0, "#32770", &cls), "GetClassInfo failed\n");
cls.lpszClassName = "MyDialogClass";
cls.hInstance = GetModuleHandleA(NULL);
- cls.lpfnWndProc = test_dlg_proc;
+ cls.lpfnWndProc = (WNDPROC)test_dlg_proc;
if (!RegisterClassA(&cls)) assert(0);
flush_sequence();
diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c
index 81fbcab928d..449fdae7b15 100644
--- a/dlls/user32/winproc.c
+++ b/dlls/user32/winproc.c
@@ -1046,7 +1046,7 @@ INT_PTR WINPROC_CallDlgProcA( DLGPROC func, HWND hwnd, UINT msg, WPARAM wParam,
if (!func) return 0;
- if (!(proc = handle_to_proc( func )))
+ if (!(proc = handle_to_proc( (WNDPROC)func )))
ret = call_dialog_proc( hwnd, msg, wParam, lParam, &result, func );
else if (proc == WINPROC_PROC16)
{
@@ -1071,7 +1071,7 @@ INT_PTR WINPROC_CallDlgProcW( DLGPROC func, HWND hwnd, UINT msg, WPARAM wParam,
if (!func) return 0;
- if (!(proc = handle_to_proc( func )))
+ if (!(proc = handle_to_proc( (WNDPROC)func )))
ret = call_dialog_proc( hwnd, msg, wParam, lParam, &result, func );
else if (proc == WINPROC_PROC16)
{
More information about the wine-cvs
mailing list