user32: Return INT_PTR instead of LRESULT in dialog procedures.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-10-18 16:42:25 +02:00
parent 63895aaf28
commit 7637e49c44
3 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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();

View File

@ -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)
{