mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:05:52 +00:00
Plugging in CallMsgFilter.
svn path=/trunk/; revision=15938
This commit is contained in:
parent
1284e1351f
commit
11ae17704c
2 changed files with 47 additions and 4 deletions
|
@ -2060,7 +2060,7 @@ IsDialogMessageA(
|
|||
INT dlgCode = 0;
|
||||
|
||||
// FIXME: hooks
|
||||
//if (CallMsgFilterA( lpMsg, MSGF_DIALOGBOX )) return TRUE;
|
||||
if (CallMsgFilterA( lpMsg, MSGF_DIALOGBOX )) return TRUE;
|
||||
|
||||
if ((hDlg != lpMsg->hwnd) && !IsChild( hDlg, lpMsg->hwnd )) return FALSE;
|
||||
|
||||
|
@ -2152,7 +2152,7 @@ IsDialogMessageW(
|
|||
INT dlgCode = 0;
|
||||
|
||||
// FIXME: hooks
|
||||
//if (CallMsgFilterW( lpMsg, MSGF_DIALOGBOX )) return TRUE;
|
||||
if (CallMsgFilterW( lpMsg, MSGF_DIALOGBOX )) return TRUE;
|
||||
|
||||
if ((hDlg != lpMsg->hwnd) && !IsChild( hDlg, lpMsg->hwnd )) return FALSE;
|
||||
|
||||
|
|
|
@ -67,8 +67,50 @@ CallMsgFilterA(
|
|||
LPMSG lpMsg,
|
||||
int nCode)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
if (nCode != HCBT_CREATEWND) ret = NtUserCallMsgFilter((LPMSG) lpMsg, nCode);
|
||||
else
|
||||
{
|
||||
UNICODE_STRING usBuffer;
|
||||
CBT_CREATEWNDA *cbtcwA = (CBT_CREATEWNDA *)lpMsg->lParam;
|
||||
CBT_CREATEWNDW cbtcwW;
|
||||
CREATESTRUCTW csW;
|
||||
MSG Msg;
|
||||
|
||||
Msg.hwnd = lpMsg->hwnd;
|
||||
Msg.message = lpMsg->message;
|
||||
Msg.time = lpMsg->time;
|
||||
Msg.pt = lpMsg->pt;
|
||||
Msg.wParam = lpMsg->wParam;
|
||||
|
||||
cbtcwW.lpcs = &csW;
|
||||
cbtcwW.hwndInsertAfter = cbtcwA->hwndInsertAfter;
|
||||
csW = *(CREATESTRUCTW *)cbtcwA->lpcs;
|
||||
|
||||
if (HIWORD(cbtcwA->lpcs->lpszName))
|
||||
{
|
||||
RtlCreateUnicodeStringFromAsciiz(&usBuffer,cbtcwA->lpcs->lpszName);
|
||||
csW.lpszName = usBuffer.Buffer;
|
||||
}
|
||||
if (HIWORD(cbtcwA->lpcs->lpszClass))
|
||||
{
|
||||
RtlCreateUnicodeStringFromAsciiz(&usBuffer,cbtcwA->lpcs->lpszClass);
|
||||
csW.lpszClass = usBuffer.Buffer;
|
||||
}
|
||||
Msg.lParam =(LPARAM) &cbtcwW;
|
||||
|
||||
ret = NtUserCallMsgFilter((LPMSG)&Msg, nCode);
|
||||
|
||||
lpMsg->time = Msg.time;
|
||||
lpMsg->pt = Msg.pt;
|
||||
|
||||
cbtcwA->hwndInsertAfter = cbtcwW.hwndInsertAfter;
|
||||
if (HIWORD(csW.lpszName)) HeapFree( GetProcessHeap(), 0, (LPWSTR)csW.lpszName );
|
||||
if (HIWORD(csW.lpszClass)) HeapFree( GetProcessHeap(), 0, (LPWSTR)csW.lpszClass );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,7 +124,8 @@ CallMsgFilterW(
|
|||
int nCode)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
return NtUserCallMsgFilter((LPMSG) lpMsg, nCode);
|
||||
// return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue