*pWnd = ClientInfo->CallbackWnd.pWnd;
*pActCtx = ClientInfo->CallbackWnd.pActCtx;
- ClientInfo->CallbackWnd.hWnd = hWndS;
- ClientInfo->CallbackWnd.pWnd = DesktopHeapAddressToUser(Window);
- ClientInfo->CallbackWnd.pActCtx = Window->pActCtx;
+ if (Window)
+ {
+ ClientInfo->CallbackWnd.hWnd = hWndS;
+ ClientInfo->CallbackWnd.pWnd = DesktopHeapAddressToUser(Window);
+ ClientInfo->CallbackWnd.pActCtx = Window->pActCtx;
+ }
+ else //// What if Dispatching WM_SYS/TIMER with NULL window? Fix AbiWord Crash when sizing.
+ {
+ ClientInfo->CallbackWnd.hWnd = hWndS;
+ ClientInfo->CallbackWnd.pWnd = Window;
+ ClientInfo->CallbackWnd.pActCtx = 0;
+ }
}
static VOID
ULONG ArgumentLength;
LRESULT Result;
+ TRACE("co_IntCallWindowProc(Proc %p, IsAnsiProc: %s, Wnd %p, Message %u, wParam %Iu, lParam %Id, lParamBufferSize %d)\n",
+ Proc, IsAnsiProc ? "TRUE" : "FALSE", Wnd, Message, wParam, lParam, lParamBufferSize);
+
/* Do not allow the desktop thread to do callback to user mode */
ASSERT(PsGetCurrentThreadWin32Thread() != gptiDesktopThread);
case WM_NCCREATE:
case WM_STYLECHANGING:
case WM_WINDOWPOSCHANGING:
+ case WM_SIZING:
+ case WM_MOVING:
TRACE("Copy lParam, Message %d Size %d lParam %d!\n", Message, lParamBufferSize, lParam);
if (InSendMessage)
// Copy into kernel space.
switch (HookId)
{
case WH_CBT:
- if (Code == HCBT_CREATEWND)
+ {
+ switch (Code)
{
- if (CbtCreatewndExtra)
- {/*
- The parameters could have been changed, include the coordinates
- and dimensions of the window. We copy it back.
- */
- CbtCreateWnd->hwndInsertAfter = CbtCreatewndExtra->WndInsertAfter;
- CbtCreateWnd->lpcs->x = CbtCreatewndExtra->Cs.x;
- CbtCreateWnd->lpcs->y = CbtCreatewndExtra->Cs.y;
- CbtCreateWnd->lpcs->cx = CbtCreatewndExtra->Cs.cx;
- CbtCreateWnd->lpcs->cy = CbtCreatewndExtra->Cs.cy;
- }
+ case HCBT_CREATEWND:
+ if (CbtCreatewndExtra)
+ {/*
+ The parameters could have been changed, include the coordinates
+ and dimensions of the window. We copy it back.
+ */
+ CbtCreateWnd->hwndInsertAfter = CbtCreatewndExtra->WndInsertAfter;
+ CbtCreateWnd->lpcs->x = CbtCreatewndExtra->Cs.x;
+ CbtCreateWnd->lpcs->y = CbtCreatewndExtra->Cs.y;
+ CbtCreateWnd->lpcs->cx = CbtCreatewndExtra->Cs.cx;
+ CbtCreateWnd->lpcs->cy = CbtCreatewndExtra->Cs.cy;
+ }
+ break;
+ case HCBT_MOVESIZE:
+ if (Extra && lParam)
+ {
+ RtlCopyMemory((PVOID) lParam, Extra, sizeof(RECTL));
+ }
+ break;
}
- break;
+ }
// "The GetMsgProc hook procedure can examine or modify the message."
case WH_GETMESSAGE:
if (pMsg)
if (pMenuName->Length)
RtlCopyMemory(&Common->MenuName, pMenuName->Buffer, pMenuName->Length);
else
- RtlCopyMemory(&Common->MenuName, &pMenuName->Buffer, sizeof(WCHAR));
+ Common->InterSource = pMenuName->Buffer;
ResultPointer = NULL;
ResultLength = sizeof(LRESULT);