Author: gadamopoulos
Date: Tue Apr 18 12:35:57 2017
New Revision: 74369
URL:
http://svn.reactos.org/svn/reactos?rev=74369&view=rev
Log:
[USER32] -CallWindowProc: Call PreWndProc and PostWndProc hooks for dialog messages if the
message is not hooked for PreDefDlgProc and PostDefDlgProc.
Modified:
trunk/reactos/win32ss/user/user32/windows/message.c
Modified: trunk/reactos/win32ss/user/user32/windows/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/message.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/message.c [iso-8859-1] Tue Apr 18 12:35:57
2017
@@ -1409,7 +1409,7 @@
{
MSG AnsiMsg;
MSG UnicodeMsg;
- BOOL Hook = FALSE, MsgOverride = FALSE, Dialog;
+ BOOL Hook = FALSE, MsgOverride = FALSE, Dialog, DlgOverride = FALSE;
LRESULT Result = 0, PreResult = 0;
DWORD Data = 0;
@@ -1427,10 +1427,9 @@
Hook = BeginIfHookedUserApiHook();
if (Hook)
{
- if (!Dialog)
- MsgOverride = IsMsgOverride( Msg, &guah.WndProcArray);
- else
- MsgOverride = IsMsgOverride( Msg, &guah.DlgProcArray);
+ if (Dialog)
+ DlgOverride = IsMsgOverride( Msg, &guah.DlgProcArray);
+ MsgOverride = IsMsgOverride( Msg, &guah.WndProcArray);
}
if (IsAnsiProc)
@@ -1447,11 +1446,11 @@
goto Exit;
}
- if (Hook && MsgOverride)
+ if (Hook && (MsgOverride || DlgOverride))
{
_SEH2_TRY
{
- if (!Dialog)
+ if (!DlgOverride)
PreResult = guah.PreWndProc(AnsiMsg.hwnd, AnsiMsg.message, AnsiMsg.wParam,
AnsiMsg.lParam, (ULONG_PTR)&Result, &Data );
else
PreResult = guah.PreDefDlgProc(AnsiMsg.hwnd, AnsiMsg.message,
AnsiMsg.wParam, AnsiMsg.lParam, (ULONG_PTR)&Result, &Data );
@@ -1479,11 +1478,11 @@
_SEH2_END;
}
- if (Hook && MsgOverride)
+ if (Hook && (MsgOverride || DlgOverride))
{
_SEH2_TRY
{
- if (!Dialog)
+ if (!DlgOverride)
guah.PostWndProc(AnsiMsg.hwnd, AnsiMsg.message, AnsiMsg.wParam,
AnsiMsg.lParam, (ULONG_PTR)&Result, &Data );
else
guah.PostDefDlgProc(AnsiMsg.hwnd, AnsiMsg.message, AnsiMsg.wParam,
AnsiMsg.lParam, (ULONG_PTR)&Result, &Data );
@@ -1501,11 +1500,11 @@
}
else
{
- if (Hook && MsgOverride)
+ if (Hook && (MsgOverride || DlgOverride))
{
_SEH2_TRY
{
- if (!Dialog)
+ if (!DlgOverride)
PreResult = guah.PreWndProc(hWnd, Msg, wParam, lParam,
(ULONG_PTR)&Result, &Data );
else
PreResult = guah.PreDefDlgProc(hWnd, Msg, wParam, lParam,
(ULONG_PTR)&Result, &Data );
@@ -1533,11 +1532,11 @@
_SEH2_END;
}
- if (Hook && MsgOverride)
+ if (Hook && (MsgOverride || DlgOverride))
{
_SEH2_TRY
{
- if (!Dialog)
+ if (!DlgOverride)
guah.PostWndProc(hWnd, Msg, wParam, lParam, (ULONG_PTR)&Result,
&Data );
else
guah.PostDefDlgProc(hWnd, Msg, wParam, lParam, (ULONG_PTR)&Result,
&Data );
@@ -1565,7 +1564,7 @@
{
MSG AnsiMsg;
MSG UnicodeMsg;
- BOOL Hook = FALSE, MsgOverride = FALSE, Dialog;
+ BOOL Hook = FALSE, MsgOverride = FALSE, Dialog, DlgOverride = FALSE;
LRESULT Result = 0, PreResult = 0;
DWORD Data = 0;
@@ -1586,19 +1585,18 @@
Hook = BeginIfHookedUserApiHook();
if (Hook)
{
- if (!Dialog)
- MsgOverride = IsMsgOverride( Msg, &guah.WndProcArray);
- else
- MsgOverride = IsMsgOverride( Msg, &guah.DlgProcArray);
+ if (Dialog)
+ DlgOverride = IsMsgOverride( Msg, &guah.DlgProcArray);
+ MsgOverride = IsMsgOverride( Msg, &guah.WndProcArray);
}
if (IsAnsiProc)
{
- if (Hook && MsgOverride)
+ if (Hook && (MsgOverride || DlgOverride))
{
_SEH2_TRY
{
- if (!Dialog)
+ if (!DlgOverride)
PreResult = guah.PreWndProc(hWnd, Msg, wParam, lParam,
(ULONG_PTR)&Result, &Data );
else
PreResult = guah.PreDefDlgProc(hWnd, Msg, wParam, lParam,
(ULONG_PTR)&Result, &Data );
@@ -1626,11 +1624,11 @@
_SEH2_END;
}
- if (Hook && MsgOverride)
+ if (Hook && (MsgOverride || DlgOverride))
{
_SEH2_TRY
{
- if (!Dialog)
+ if (!DlgOverride)
guah.PostWndProc(hWnd, Msg, wParam, lParam, (ULONG_PTR)&Result,
&Data );
else
guah.PostDefDlgProc(hWnd, Msg, wParam, lParam, (ULONG_PTR)&Result,
&Data );
@@ -1655,11 +1653,11 @@
goto Exit;
}
- if (Hook && MsgOverride)
+ if (Hook && (MsgOverride || DlgOverride))
{
_SEH2_TRY
{
- if (!Dialog)
+ if (!DlgOverride)
PreResult = guah.PreWndProc(UnicodeMsg.hwnd, UnicodeMsg.message,
UnicodeMsg.wParam, UnicodeMsg.lParam, (ULONG_PTR)&Result, &Data );
else
PreResult = guah.PreDefDlgProc(UnicodeMsg.hwnd, UnicodeMsg.message,
UnicodeMsg.wParam, UnicodeMsg.lParam, (ULONG_PTR)&Result, &Data );
@@ -1687,11 +1685,11 @@
_SEH2_END;
}
- if (Hook && MsgOverride)
+ if (Hook && (MsgOverride || DlgOverride))
{
_SEH2_TRY
{
- if (!Dialog)
+ if (!DlgOverride)
guah.PostWndProc(UnicodeMsg.hwnd, UnicodeMsg.message, UnicodeMsg.wParam,
UnicodeMsg.lParam, (ULONG_PTR)&Result, &Data );
else
guah.PostDefDlgProc(UnicodeMsg.hwnd, UnicodeMsg.message,
UnicodeMsg.wParam, UnicodeMsg.lParam, (ULONG_PTR)&Result, &Data );