mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTUSER] Use UserHMGetHandle macro (#6244)
Use UserHMGetHandle macro everywhere instead of obj->head.h for consistency.
This commit is contained in:
parent
90432c1a4c
commit
90ed686209
20 changed files with 121 additions and 121 deletions
|
@ -54,7 +54,7 @@ co_IntTranslateAccelerator(
|
||||||
|
|
||||||
ASSERT_REFS_CO(Window);
|
ASSERT_REFS_CO(Window);
|
||||||
|
|
||||||
hWnd = Window->head.h;
|
hWnd = UserHMGetHandle(Window);
|
||||||
|
|
||||||
TRACE("IntTranslateAccelerator(hwnd %p, message %x, wParam %x, lParam %x, fVirt 0x%x, key %x, cmd %x)\n",
|
TRACE("IntTranslateAccelerator(hwnd %p, message %x, wParam %x, lParam %x, fVirt 0x%x, key %x, cmd %x)\n",
|
||||||
hWnd, pMsg->message, pMsg->wParam, pMsg->lParam, pAccel->fVirt, pAccel->key, pAccel->cmd);
|
hWnd, pMsg->message, pMsg->wParam, pMsg->lParam, pAccel->fVirt, pAccel->key, pAccel->cmd);
|
||||||
|
@ -104,7 +104,7 @@ co_IntTranslateAccelerator(
|
||||||
if (MenuObject)
|
if (MenuObject)
|
||||||
{
|
{
|
||||||
if ((MENU_FindItem (&MenuObject, &nPos, MF_BYPOSITION)))
|
if ((MENU_FindItem (&MenuObject, &nPos, MF_BYPOSITION)))
|
||||||
hSubMenu = MenuObject->head.h;
|
hSubMenu = UserHMGetHandle(MenuObject);
|
||||||
else
|
else
|
||||||
hMenu = NULL;
|
hMenu = NULL;
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ co_IntTranslateAccelerator(
|
||||||
if (MenuObject)
|
if (MenuObject)
|
||||||
{
|
{
|
||||||
if ((MENU_FindItem (&MenuObject, &nPos, MF_BYPOSITION)))
|
if ((MENU_FindItem (&MenuObject, &nPos, MF_BYPOSITION)))
|
||||||
hSubMenu = MenuObject->head.h;
|
hSubMenu = UserHMGetHandle(MenuObject);
|
||||||
else
|
else
|
||||||
hMenu = NULL;
|
hMenu = NULL;
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@ UserDestroyAccelTable(PVOID Object)
|
||||||
Accel->Table = NULL;
|
Accel->Table = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserDeleteObject(Accel->head.h, TYPE_ACCELTABLE);
|
UserDeleteObject(UserHMGetHandle(Accel), TYPE_ACCELTABLE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,7 @@ BOOL FASTCALL co_UserHideCaret(PWND Window OPTIONAL)
|
||||||
pti = PsGetCurrentThreadWin32Thread();
|
pti = PsGetCurrentThreadWin32Thread();
|
||||||
ThreadQueue = pti->MessageQueue;
|
ThreadQueue = pti->MessageQueue;
|
||||||
|
|
||||||
if(Window && ThreadQueue->CaretInfo.hWnd != Window->head.h)
|
if(Window && ThreadQueue->CaretInfo.hWnd != UserHMGetHandle(Window))
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -276,7 +276,7 @@ BOOL FASTCALL co_UserShowCaret(PWND Window OPTIONAL)
|
||||||
pti = PsGetCurrentThreadWin32Thread();
|
pti = PsGetCurrentThreadWin32Thread();
|
||||||
ThreadQueue = pti->MessageQueue;
|
ThreadQueue = pti->MessageQueue;
|
||||||
|
|
||||||
if(Window && ThreadQueue->CaretInfo.hWnd != Window->head.h)
|
if(Window && ThreadQueue->CaretInfo.hWnd != UserHMGetHandle(Window))
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -382,7 +382,7 @@ UserClipboardRelease(PWND pWindow)
|
||||||
if (!pWinStaObj)
|
if (!pWinStaObj)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
co_IntSendMessage(pWinStaObj->spwndClipOwner->head.h, WM_RENDERALLFORMATS, 0, 0);
|
co_IntSendMessage(UserHMGetHandle(pWinStaObj->spwndClipOwner), WM_RENDERALLFORMATS, 0, 0);
|
||||||
|
|
||||||
/* If the window being destroyed is the current clipboard owner... */
|
/* If the window being destroyed is the current clipboard owner... */
|
||||||
if (pWindow == pWinStaObj->spwndClipOwner)
|
if (pWindow == pWinStaObj->spwndClipOwner)
|
||||||
|
@ -400,9 +400,9 @@ UserClipboardRelease(PWND pWindow)
|
||||||
pWinStaObj->fClipboardChanged = FALSE;
|
pWinStaObj->fClipboardChanged = FALSE;
|
||||||
if (pWinStaObj->spwndClipViewer)
|
if (pWinStaObj->spwndClipViewer)
|
||||||
{
|
{
|
||||||
TRACE("Clipboard: sending WM_DRAWCLIPBOARD to %p\n", pWinStaObj->spwndClipViewer->head.h);
|
TRACE("Clipboard: sending WM_DRAWCLIPBOARD to %p\n", UserHMGetHandle(pWinStaObj->spwndClipViewer));
|
||||||
// For 32-bit applications this message is sent as a notification
|
// For 32-bit applications this message is sent as a notification
|
||||||
co_IntSendMessageNoWait(pWinStaObj->spwndClipViewer->head.h, WM_DRAWCLIPBOARD, 0, 0);
|
co_IntSendMessageNoWait(UserHMGetHandle(pWinStaObj->spwndClipViewer), WM_DRAWCLIPBOARD, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -572,9 +572,9 @@ UserCloseClipboard(VOID)
|
||||||
pWinStaObj->fClipboardChanged = FALSE;
|
pWinStaObj->fClipboardChanged = FALSE;
|
||||||
if (pWinStaObj->spwndClipViewer)
|
if (pWinStaObj->spwndClipViewer)
|
||||||
{
|
{
|
||||||
TRACE("Clipboard: sending WM_DRAWCLIPBOARD to %p\n", pWinStaObj->spwndClipViewer->head.h);
|
TRACE("Clipboard: sending WM_DRAWCLIPBOARD to %p\n", UserHMGetHandle(pWinStaObj->spwndClipViewer));
|
||||||
// For 32-bit applications this message is sent as a notification
|
// For 32-bit applications this message is sent as a notification
|
||||||
co_IntSendMessageNoWait(pWinStaObj->spwndClipViewer->head.h, WM_DRAWCLIPBOARD, 0, 0);
|
co_IntSendMessageNoWait(UserHMGetHandle(pWinStaObj->spwndClipViewer), WM_DRAWCLIPBOARD, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -610,7 +610,7 @@ NtUserGetOpenClipboardWindow(VOID)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (pWinStaObj->spwndClipOpen)
|
if (pWinStaObj->spwndClipOpen)
|
||||||
hWnd = pWinStaObj->spwndClipOpen->head.h;
|
hWnd = UserHMGetHandle(pWinStaObj->spwndClipOpen);
|
||||||
|
|
||||||
ObDereferenceObject(pWinStaObj);
|
ObDereferenceObject(pWinStaObj);
|
||||||
|
|
||||||
|
@ -643,7 +643,7 @@ NtUserChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext)
|
||||||
pWinStaObj->spwndClipViewer = UserGetWindowObject(hWndNewNext);
|
pWinStaObj->spwndClipViewer = UserGetWindowObject(hWndNewNext);
|
||||||
|
|
||||||
if (pWinStaObj->spwndClipViewer)
|
if (pWinStaObj->spwndClipViewer)
|
||||||
bRet = (BOOL)co_IntSendMessage(pWinStaObj->spwndClipViewer->head.h, WM_CHANGECBCHAIN, (WPARAM)hWndRemove, (LPARAM)hWndNewNext);
|
bRet = (BOOL)co_IntSendMessage(UserHMGetHandle(pWinStaObj->spwndClipViewer), WM_CHANGECBCHAIN, (WPARAM)hWndRemove, (LPARAM)hWndNewNext);
|
||||||
}
|
}
|
||||||
|
|
||||||
ObDereferenceObject(pWinStaObj);
|
ObDereferenceObject(pWinStaObj);
|
||||||
|
@ -697,9 +697,9 @@ UserEmptyClipboard(VOID)
|
||||||
|
|
||||||
if (pWinStaObj->spwndClipOwner)
|
if (pWinStaObj->spwndClipOwner)
|
||||||
{
|
{
|
||||||
TRACE("Clipboard: WM_DESTROYCLIPBOARD to %p\n", pWinStaObj->spwndClipOwner->head.h);
|
TRACE("Clipboard: WM_DESTROYCLIPBOARD to %p\n", UserHMGetHandle(pWinStaObj->spwndClipOwner));
|
||||||
// For 32-bit applications this message is sent as a notification
|
// For 32-bit applications this message is sent as a notification
|
||||||
co_IntSendMessage(pWinStaObj->spwndClipOwner->head.h, WM_DESTROYCLIPBOARD, 0, 0);
|
co_IntSendMessage(UserHMGetHandle(pWinStaObj->spwndClipOwner), WM_DESTROYCLIPBOARD, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
pWinStaObj->spwndClipOwner = pWinStaObj->spwndClipOpen;
|
pWinStaObj->spwndClipOwner = pWinStaObj->spwndClipOpen;
|
||||||
|
@ -786,7 +786,7 @@ NtUserGetClipboardOwner(VOID)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (pWinStaObj->spwndClipOwner)
|
if (pWinStaObj->spwndClipOwner)
|
||||||
hWnd = pWinStaObj->spwndClipOwner->head.h;
|
hWnd = UserHMGetHandle(pWinStaObj->spwndClipOwner);
|
||||||
|
|
||||||
ObDereferenceObject(pWinStaObj);
|
ObDereferenceObject(pWinStaObj);
|
||||||
|
|
||||||
|
@ -809,7 +809,7 @@ NtUserGetClipboardViewer(VOID)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (pWinStaObj->spwndClipViewer)
|
if (pWinStaObj->spwndClipViewer)
|
||||||
hWnd = pWinStaObj->spwndClipViewer->head.h;
|
hWnd = UserHMGetHandle(pWinStaObj->spwndClipViewer);
|
||||||
|
|
||||||
ObDereferenceObject(pWinStaObj);
|
ObDereferenceObject(pWinStaObj);
|
||||||
|
|
||||||
|
@ -966,7 +966,7 @@ NtUserGetClipboardData(UINT fmt, PGETCLIPBDATA pgcd)
|
||||||
{
|
{
|
||||||
/* Send WM_RENDERFORMAT message */
|
/* Send WM_RENDERFORMAT message */
|
||||||
pWinStaObj->fInDelayedRendering = TRUE;
|
pWinStaObj->fInDelayedRendering = TRUE;
|
||||||
co_IntSendMessage(pWinStaObj->spwndClipOwner->head.h, WM_RENDERFORMAT, (WPARAM)uSourceFmt, 0);
|
co_IntSendMessage(UserHMGetHandle(pWinStaObj->spwndClipOwner), WM_RENDERFORMAT, (WPARAM)uSourceFmt, 0);
|
||||||
pWinStaObj->fInDelayedRendering = FALSE;
|
pWinStaObj->fInDelayedRendering = FALSE;
|
||||||
|
|
||||||
/* Data should be in clipboard now */
|
/* Data should be in clipboard now */
|
||||||
|
@ -1133,7 +1133,7 @@ NtUserSetClipboardViewer(HWND hWndNewViewer)
|
||||||
/* Return previous viewer. New viever window should
|
/* Return previous viewer. New viever window should
|
||||||
send messages to rest of the chain */
|
send messages to rest of the chain */
|
||||||
if (pWinStaObj->spwndClipViewer)
|
if (pWinStaObj->spwndClipViewer)
|
||||||
hWndNext = pWinStaObj->spwndClipViewer->head.h;
|
hWndNext = UserHMGetHandle(pWinStaObj->spwndClipViewer);
|
||||||
|
|
||||||
/* Set new viewer window */
|
/* Set new viewer window */
|
||||||
pWinStaObj->spwndClipViewer = pWindow;
|
pWinStaObj->spwndClipViewer = pWindow;
|
||||||
|
@ -1142,9 +1142,9 @@ NtUserSetClipboardViewer(HWND hWndNewViewer)
|
||||||
pWinStaObj->fClipboardChanged = FALSE;
|
pWinStaObj->fClipboardChanged = FALSE;
|
||||||
if (pWinStaObj->spwndClipViewer)
|
if (pWinStaObj->spwndClipViewer)
|
||||||
{
|
{
|
||||||
TRACE("Clipboard: sending WM_DRAWCLIPBOARD to %p\n", pWinStaObj->spwndClipViewer->head.h);
|
TRACE("Clipboard: sending WM_DRAWCLIPBOARD to %p\n", UserHMGetHandle(pWinStaObj->spwndClipViewer));
|
||||||
// For 32-bit applications this message is sent as a notification
|
// For 32-bit applications this message is sent as a notification
|
||||||
co_IntSendMessageNoWait(pWinStaObj->spwndClipViewer->head.h, WM_DRAWCLIPBOARD, 0, 0);
|
co_IntSendMessageNoWait(UserHMGetHandle(pWinStaObj->spwndClipViewer), WM_DRAWCLIPBOARD, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
|
|
@ -324,7 +324,7 @@ IntDestroyCurIconObject(
|
||||||
|
|
||||||
/* We just mark the handle as being destroyed.
|
/* We just mark the handle as being destroyed.
|
||||||
* Deleting all the stuff will be deferred to the actual struct free. */
|
* Deleting all the stuff will be deferred to the actual struct free. */
|
||||||
UserDeleteObject(CurIcon->head.h, TYPE_CURSOR);
|
UserDeleteObject(UserHMGetHandle(CurIcon), TYPE_CURSOR);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,7 +659,7 @@ NtUserGetCursorInfo(
|
||||||
|
|
||||||
SafeCi.cbSize = sizeof(CURSORINFO);
|
SafeCi.cbSize = sizeof(CURSORINFO);
|
||||||
SafeCi.flags = ((CurIcon && CurInfo->ShowingCursor >= 0) ? CURSOR_SHOWING : 0);
|
SafeCi.flags = ((CurIcon && CurInfo->ShowingCursor >= 0) ? CURSOR_SHOWING : 0);
|
||||||
SafeCi.hCursor = (CurIcon ? CurIcon->head.h : NULL);
|
SafeCi.hCursor = (CurIcon ? UserHMGetHandle(CurIcon) : NULL);
|
||||||
|
|
||||||
SafeCi.ptScreenPos = gpsi->ptCursor;
|
SafeCi.ptScreenPos = gpsi->ptCursor;
|
||||||
|
|
||||||
|
@ -973,7 +973,7 @@ NtUserFindExistingCursorIcon(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CurIcon)
|
if (CurIcon)
|
||||||
Ret = CurIcon->head.h;
|
Ret = UserHMGetHandle(CurIcon);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
@ -2145,7 +2145,7 @@ NtUserGetCursorFrameInfo(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = CurIcon->head.h;
|
ret = UserHMGetHandle(CurIcon);
|
||||||
|
|
||||||
if (CurIcon->CURSORF_flags & CURSORF_ACON)
|
if (CurIcon->CURSORF_flags & CURSORF_ACON)
|
||||||
{
|
{
|
||||||
|
@ -2158,7 +2158,7 @@ NtUserGetCursorFrameInfo(
|
||||||
}
|
}
|
||||||
jiffies = AniCurIcon->ajifRate[istep];
|
jiffies = AniCurIcon->ajifRate[istep];
|
||||||
steps = AniCurIcon->cicur;
|
steps = AniCurIcon->cicur;
|
||||||
ret = AniCurIcon->aspcur[AniCurIcon->aicur[istep]]->head.h;
|
ret = UserHMGetHandle(AniCurIcon->aspcur[AniCurIcon->aicur[istep]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
|
|
|
@ -613,7 +613,7 @@ IntDefWindowProc(
|
||||||
|
|
||||||
case WM_SYSCOMMAND:
|
case WM_SYSCOMMAND:
|
||||||
{
|
{
|
||||||
TRACE("hwnd %p WM_SYSCOMMAND %lx %lx\n", Wnd->head.h, wParam, lParam );
|
TRACE("hwnd %p WM_SYSCOMMAND %lx %lx\n", UserHMGetHandle(Wnd), wParam, lParam );
|
||||||
lResult = DefWndHandleSysCommand(Wnd, wParam, lParam);
|
lResult = DefWndHandleSysCommand(Wnd, wParam, lParam);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1285,7 +1285,7 @@ IntDefWindowProc(
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
}
|
}
|
||||||
if (!lResult)
|
if (!lResult)
|
||||||
lResult = co_HOOK_CallHooks(WH_CBT, HCBT_MOVESIZE, (WPARAM)Wnd->head.h, lParam ? (LPARAM)&rt : 0);
|
lResult = co_HOOK_CallHooks(WH_CBT, HCBT_MOVESIZE, (WPARAM)UserHMGetHandle(Wnd), lParam ? (LPARAM)&rt : 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1405,7 +1405,7 @@ HWND FASTCALL IntGetMessageWindow(VOID)
|
||||||
TRACE("No active desktop\n");
|
TRACE("No active desktop\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return pdo->spwndMessage->head.h;
|
return UserHMGetHandle(pdo->spwndMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Win: _GetMessageWindow
|
// Win: _GetMessageWindow
|
||||||
|
@ -2458,7 +2458,7 @@ IntCreateDesktop(
|
||||||
}
|
}
|
||||||
|
|
||||||
pdesk->dwSessionId = PsGetCurrentProcessSessionId();
|
pdesk->dwSessionId = PsGetCurrentProcessSessionId();
|
||||||
pdesk->DesktopWindow = pWnd->head.h;
|
pdesk->DesktopWindow = UserHMGetHandle(pWnd);
|
||||||
pdesk->pDeskInfo->spwnd = pWnd;
|
pdesk->pDeskInfo->spwnd = pWnd;
|
||||||
pWnd->fnid = FNID_DESKTOP;
|
pWnd->fnid = FNID_DESKTOP;
|
||||||
|
|
||||||
|
|
|
@ -789,7 +789,7 @@ co_IntSetForegroundMessageQueue(
|
||||||
ptiChg = Wnd->head.pti;
|
ptiChg = Wnd->head.pti;
|
||||||
IntSetFocusMessageQueue(Wnd->head.pti->MessageQueue);
|
IntSetFocusMessageQueue(Wnd->head.pti->MessageQueue);
|
||||||
gptiForeground = Wnd->head.pti;
|
gptiForeground = Wnd->head.pti;
|
||||||
//ERR("Set Foreground pti 0x%p Q 0x%p hWnd 0x%p\n",Wnd->head.pti, Wnd->head.pti->MessageQueue,Wnd->head.h);
|
//ERR("Set Foreground pti 0x%p Q 0x%p hWnd 0x%p\n", Wnd->head.pti, Wnd->head.pti->MessageQueue, UserHMGetHandle(Wnd));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -879,7 +879,7 @@ co_IntSetForegroundMessageQueue(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ERR("SFWAMQ : SAW I pti 0x%p hWnd 0x%p\n",ptiChg,Wnd->head.h);
|
//ERR("SFWAMQ : SAW I pti 0x%p hWnd 0x%p\n", ptiChg, Wnd ? UserHMGetHandle(Wnd) : NULL);
|
||||||
Ret = co_IntSetActiveWindow(Wnd, MouseActivate, TRUE/*Type*/, FALSE);
|
Ret = co_IntSetActiveWindow(Wnd, MouseActivate, TRUE/*Type*/, FALSE);
|
||||||
//if (!Ret) ERR("SFWAMQ : ISAW : return error\n");
|
//if (!Ret) ERR("SFWAMQ : ISAW : return error\n");
|
||||||
return Ret;
|
return Ret;
|
||||||
|
@ -898,7 +898,7 @@ co_IntSetForegroundMessageQueue(
|
||||||
if ( pumqPrev && pumq == pumqPrev )
|
if ( pumqPrev && pumq == pumqPrev )
|
||||||
{
|
{
|
||||||
HANDLE tid = Wnd ? PsGetThreadId(Wnd->head.pti->pEThread) : NULL;
|
HANDLE tid = Wnd ? PsGetThreadId(Wnd->head.pti->pEThread) : NULL;
|
||||||
//ERR("SFWAMQ : DAW I pti 0x%p tid 0x%p hWnd 0x%p\n",ptiPrev,tid,Wnd ? Wnd->head.h : 0);
|
//ERR("SFWAMQ : DAW I pti 0x%p tid 0x%p hWnd 0x%p\n", ptiPrev, tid, Wnd ? UserHMGetHandle(Wnd) : NULL);
|
||||||
IntDeactivateWindow(pti, tid);
|
IntDeactivateWindow(pti, tid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1287,7 +1287,7 @@ UserSetActiveWindow( _In_opt_ PWND Wnd )
|
||||||
!(gpqForegroundPrev->spwndActivePrev->state2 & WNDS2_BOTTOMMOST) &&
|
!(gpqForegroundPrev->spwndActivePrev->state2 & WNDS2_BOTTOMMOST) &&
|
||||||
(Wnd = VerifyWnd(gpqForegroundPrev->spwndActivePrev)) != NULL )
|
(Wnd = VerifyWnd(gpqForegroundPrev->spwndActivePrev)) != NULL )
|
||||||
{
|
{
|
||||||
TRACE("USAW:PAW hwnd %p\n",Wnd?Wnd->head.h:NULL);
|
TRACE("USAW:PAW hwnd %p\n", UserHMGetHandle(Wnd));
|
||||||
return IntUserSetActiveWindow(Wnd, FALSE, TRUE, FALSE);
|
return IntUserSetActiveWindow(Wnd, FALSE, TRUE, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1295,7 +1295,7 @@ UserSetActiveWindow( _In_opt_ PWND Wnd )
|
||||||
if ( pti->MessageQueue->spwndActive &&
|
if ( pti->MessageQueue->spwndActive &&
|
||||||
(Wnd = VerifyWnd(pti->MessageQueue->spwndActive)) != NULL )
|
(Wnd = VerifyWnd(pti->MessageQueue->spwndActive)) != NULL )
|
||||||
{
|
{
|
||||||
//ERR("USAW:AOWM hwnd %p\n",Wnd?Wnd->head.h:NULL);
|
//ERR("USAW:AOWM hwnd %p\n", UserHMGetHandle(Wnd));
|
||||||
if (!ActivateOtherWindowMin(Wnd))
|
if (!ActivateOtherWindowMin(Wnd))
|
||||||
{
|
{
|
||||||
// Okay, now go find someone else to play with!
|
// Okay, now go find someone else to play with!
|
||||||
|
@ -1351,7 +1351,7 @@ co_UserSetFocus(PWND Window)
|
||||||
if (pwndTop->spwndParent == NULL) break;
|
if (pwndTop->spwndParent == NULL) break;
|
||||||
}
|
}
|
||||||
////
|
////
|
||||||
if (co_HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)Window->head.h, (LPARAM)hWndPrev))
|
if (co_HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)UserHMGetHandle(Window), (LPARAM)hWndPrev))
|
||||||
{
|
{
|
||||||
ERR("SetFocus 1 WH_CBT Call Hook return!\n");
|
ERR("SetFocus 1 WH_CBT Call Hook return!\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1401,7 +1401,7 @@ co_UserSetFocus(PWND Window)
|
||||||
|
|
||||||
IntSendFocusMessages( pti, Window);
|
IntSendFocusMessages( pti, Window);
|
||||||
|
|
||||||
TRACE("Focus: %p -> %p\n", hWndPrev, Window->head.h);
|
TRACE("Focus: %p -> %p\n", hWndPrev, UserHMGetHandle(Window));
|
||||||
}
|
}
|
||||||
else /* NULL hwnd passed in */
|
else /* NULL hwnd passed in */
|
||||||
{
|
{
|
||||||
|
|
|
@ -982,7 +982,7 @@ IntGetGlobalHookHandles(PDESKTOP pdo, int HookId)
|
||||||
{
|
{
|
||||||
pHook = CONTAINING_RECORD(pElem, HOOK, Chain);
|
pHook = CONTAINING_RECORD(pElem, HOOK, Chain);
|
||||||
NT_ASSERT(i < cHooks);
|
NT_ASSERT(i < cHooks);
|
||||||
pList[i++] = pHook->head.h;
|
pList[i++] = UserHMGetHandle(pHook);
|
||||||
}
|
}
|
||||||
pList[i] = NULL;
|
pList[i] = NULL;
|
||||||
|
|
||||||
|
|
|
@ -362,7 +362,7 @@ cleanup:
|
||||||
{
|
{
|
||||||
/* We have failed - destroy created object */
|
/* We have failed - destroy created object */
|
||||||
if (pkf)
|
if (pkf)
|
||||||
UserDeleteObject(pkf->head.h, TYPE_KBDFILE);
|
UserDeleteObject(UserHMGetHandle(pkf), TYPE_KBDFILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pRet;
|
return pRet;
|
||||||
|
@ -398,7 +398,7 @@ co_UserLoadKbdLayout(PUNICODE_STRING pustrKLID, HKL hKL)
|
||||||
if (!pKl->spkf)
|
if (!pKl->spkf)
|
||||||
{
|
{
|
||||||
ERR("UserLoadKbdFile(%wZ) failed!\n", pustrKLID);
|
ERR("UserLoadKbdFile(%wZ) failed!\n", pustrKLID);
|
||||||
UserDeleteObject(pKl->head.h, TYPE_KBDLAYOUT);
|
UserDeleteObject(UserHMGetHandle(pKl), TYPE_KBDLAYOUT);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,7 +406,7 @@ co_UserLoadKbdLayout(PUNICODE_STRING pustrKLID, HKL hKL)
|
||||||
if (!NT_SUCCESS(RtlUnicodeStringToInteger(pustrKLID, 16, (PULONG)&lCid)))
|
if (!NT_SUCCESS(RtlUnicodeStringToInteger(pustrKLID, 16, (PULONG)&lCid)))
|
||||||
{
|
{
|
||||||
ERR("RtlUnicodeStringToInteger failed for '%wZ'\n", pustrKLID);
|
ERR("RtlUnicodeStringToInteger failed for '%wZ'\n", pustrKLID);
|
||||||
UserDeleteObject(pKl->head.h, TYPE_KBDLAYOUT);
|
UserDeleteObject(UserHMGetHandle(pKl), TYPE_KBDLAYOUT);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,7 +461,7 @@ UnloadKbdFile(_In_ PKBDFILE pkf)
|
||||||
*ppkfLink = pkf->pkfNext;
|
*ppkfLink = pkf->pkfNext;
|
||||||
|
|
||||||
EngUnloadImage(pkf->hBase);
|
EngUnloadImage(pkf->hBase);
|
||||||
UserDeleteObject(pkf->head.h, TYPE_KBDFILE);
|
UserDeleteObject(UserHMGetHandle(pkf), TYPE_KBDFILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -501,7 +501,7 @@ UserUnloadKbl(PKL pKl)
|
||||||
{
|
{
|
||||||
ExFreePoolWithTag(pKl->piiex, USERTAG_IME);
|
ExFreePoolWithTag(pKl->piiex, USERTAG_IME);
|
||||||
}
|
}
|
||||||
UserDeleteObject(pKl->head.h, TYPE_KBDLAYOUT);
|
UserDeleteObject(UserHMGetHandle(pKl), TYPE_KBDLAYOUT);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -347,7 +347,7 @@ IntDestroyMenuObject(PMENU Menu, BOOL bRecurse)
|
||||||
/* Remove all menu items */
|
/* Remove all menu items */
|
||||||
IntDestroyMenu( Menu, bRecurse);
|
IntDestroyMenu( Menu, bRecurse);
|
||||||
|
|
||||||
ret = UserDeleteObject(Menu->head.h, TYPE_MENU);
|
ret = UserDeleteObject(UserHMGetHandle(Menu), TYPE_MENU);
|
||||||
TRACE("IntDestroyMenuObject %d\n",ret);
|
TRACE("IntDestroyMenuObject %d\n",ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -903,7 +903,7 @@ IntGetMenuInfo(PMENU Menu, PROSMENUINFO lpmi)
|
||||||
lpmi->dwArrowsOn = Menu->dwArrowsOn;
|
lpmi->dwArrowsOn = Menu->dwArrowsOn;
|
||||||
|
|
||||||
lpmi->fFlags = Menu->fFlags;
|
lpmi->fFlags = Menu->fFlags;
|
||||||
lpmi->Self = Menu->head.h;
|
lpmi->Self = UserHMGetHandle(Menu);
|
||||||
lpmi->TimeToHide = Menu->TimeToHide;
|
lpmi->TimeToHide = Menu->TimeToHide;
|
||||||
lpmi->Wnd = Menu->hWnd;
|
lpmi->Wnd = Menu->hWnd;
|
||||||
}
|
}
|
||||||
|
@ -991,7 +991,7 @@ IntGetMenuItemInfo(PMENU Menu, /* UNUSED PARAM!! */
|
||||||
}
|
}
|
||||||
if(lpmii->fMask & MIIM_SUBMENU)
|
if(lpmii->fMask & MIIM_SUBMENU)
|
||||||
{
|
{
|
||||||
lpmii->hSubMenu = MenuItem->spSubMenu ? MenuItem->spSubMenu->head.h : NULL;
|
lpmii->hSubMenu = (MenuItem->spSubMenu ? UserHMGetHandle(MenuItem->spSubMenu) : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((lpmii->fMask & MIIM_STRING) ||
|
if ((lpmii->fMask & MIIM_STRING) ||
|
||||||
|
@ -5939,7 +5939,7 @@ NtUserGetMenuBarInfo(
|
||||||
{
|
{
|
||||||
if (UserHMGetHandle(pPopupMenu->spmenu) != hMenu)
|
if (UserHMGetHandle(pPopupMenu->spmenu) != hMenu)
|
||||||
{
|
{
|
||||||
ERR("Window Pop Up hMenu %p not the same as Get hMenu %p!\n",pPopupMenu->spmenu->head.h,hMenu);
|
ERR("Window Pop Up hMenu %p not the same as Get hMenu %p!\n", UserHMGetHandle(pPopupMenu->spmenu), hMenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -777,7 +777,7 @@ static LRESULT handle_internal_message( PWND pWnd, UINT msg, WPARAM wparam, LPAR
|
||||||
if (!pWnd || UserIsDesktopWindow(pWnd) || UserIsMessageWindow(pWnd))
|
if (!pWnd || UserIsDesktopWindow(pWnd) || UserIsMessageWindow(pWnd))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
TRACE("Internal Event Msg 0x%x hWnd 0x%p\n", msg, pWnd->head.h);
|
TRACE("Internal Event Msg 0x%x hWnd 0x%p\n", msg, UserHMGetHandle(pWnd));
|
||||||
|
|
||||||
switch(msg)
|
switch(msg)
|
||||||
{
|
{
|
||||||
|
@ -1377,7 +1377,7 @@ UserPostMessage( HWND Wnd,
|
||||||
|
|
||||||
if (List != NULL)
|
if (List != NULL)
|
||||||
{
|
{
|
||||||
UserPostMessage(DesktopWindow->head.h, Msg, wParam, lParam);
|
UserPostMessage(UserHMGetHandle(DesktopWindow), Msg, wParam, lParam);
|
||||||
for (i = 0; List[i]; i++)
|
for (i = 0; List[i]; i++)
|
||||||
{
|
{
|
||||||
PWND pwnd = UserGetWindowObject(List[i]);
|
PWND pwnd = UserGetWindowObject(List[i]);
|
||||||
|
@ -1683,7 +1683,7 @@ co_IntSendMessageTimeout( HWND hWnd,
|
||||||
if (hWnd != HWND_TOPMOST)
|
if (hWnd != HWND_TOPMOST)
|
||||||
{
|
{
|
||||||
/* Send message to the desktop window too! */
|
/* Send message to the desktop window too! */
|
||||||
co_IntSendMessageTimeoutSingle(DesktopWindow->head.h, Msg, wParam, lParam, uFlags, uTimeout, uResult);
|
co_IntSendMessageTimeoutSingle(UserHMGetHandle(DesktopWindow), Msg, wParam, lParam, uFlags, uTimeout, uResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
Children = IntWinListChildren(DesktopWindow);
|
Children = IntWinListChildren(DesktopWindow);
|
||||||
|
@ -2062,7 +2062,7 @@ UserSendNotifyMessage( HWND hWnd,
|
||||||
|
|
||||||
if (List != NULL)
|
if (List != NULL)
|
||||||
{
|
{
|
||||||
UserSendNotifyMessage(DesktopWindow->head.h, Msg, wParam, lParam);
|
UserSendNotifyMessage(UserHMGetHandle(DesktopWindow), Msg, wParam, lParam);
|
||||||
for (i = 0; List[i]; i++)
|
for (i = 0; List[i]; i++)
|
||||||
{
|
{
|
||||||
PWND pwnd = UserGetWindowObject(List[i]);
|
PWND pwnd = UserGetWindowObject(List[i]);
|
||||||
|
|
|
@ -634,7 +634,7 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pwnd = IntTopLevelWindowFromPoint(Msg->pt.x, Msg->pt.y);
|
pwnd = IntTopLevelWindowFromPoint(Msg->pt.x, Msg->pt.y);
|
||||||
if (pwnd) Msg->hwnd = pwnd->head.h;
|
if (pwnd) Msg->hwnd = UserHMGetHandle(pwnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
hdcScreen = IntGetScreenDC();
|
hdcScreen = IntGetScreenDC();
|
||||||
|
@ -813,7 +813,7 @@ MsqRemoveWindowMessagesFromQueue(PWND Window)
|
||||||
{
|
{
|
||||||
PostedMessage = CONTAINING_RECORD(CurrentEntry, USER_MESSAGE, ListEntry);
|
PostedMessage = CONTAINING_RECORD(CurrentEntry, USER_MESSAGE, ListEntry);
|
||||||
|
|
||||||
if (PostedMessage->Msg.hwnd == Window->head.h)
|
if (PostedMessage->Msg.hwnd == UserHMGetHandle(Window))
|
||||||
{
|
{
|
||||||
if (PostedMessage->Msg.message == WM_QUIT && pti->QuitPosted == 0)
|
if (PostedMessage->Msg.message == WM_QUIT && pti->QuitPosted == 0)
|
||||||
{
|
{
|
||||||
|
@ -837,7 +837,7 @@ MsqRemoveWindowMessagesFromQueue(PWND Window)
|
||||||
{
|
{
|
||||||
SentMessage = CONTAINING_RECORD(CurrentEntry, USER_SENT_MESSAGE, ListEntry);
|
SentMessage = CONTAINING_RECORD(CurrentEntry, USER_SENT_MESSAGE, ListEntry);
|
||||||
|
|
||||||
if(SentMessage->Msg.hwnd == Window->head.h)
|
if(SentMessage->Msg.hwnd == UserHMGetHandle(Window))
|
||||||
{
|
{
|
||||||
ERR("Remove Window Messages %p From Sent Queue\n",SentMessage);
|
ERR("Remove Window Messages %p From Sent Queue\n",SentMessage);
|
||||||
#if 0 // Should mark these as invalid and allow the rest clean up, so far no harm by just commenting out. See CORE-9210.
|
#if 0 // Should mark these as invalid and allow the rest clean up, so far no harm by just commenting out. See CORE-9210.
|
||||||
|
@ -1984,7 +1984,7 @@ co_MsqPeekHardwareMessage(IN PTHREADINFO pti,
|
||||||
*/
|
*/
|
||||||
if ( ( !Window || // 1
|
if ( ( !Window || // 1
|
||||||
( Window == PWND_BOTTOM && CurrentMessage->Msg.hwnd == NULL ) || // 2
|
( Window == PWND_BOTTOM && CurrentMessage->Msg.hwnd == NULL ) || // 2
|
||||||
( Window != PWND_BOTTOM && Window->head.h == CurrentMessage->Msg.hwnd ) || // 3
|
( Window != PWND_BOTTOM && UserHMGetHandle(Window) == CurrentMessage->Msg.hwnd ) || // 3
|
||||||
( is_mouse_message(CurrentMessage->Msg.message) ) ) && // Null window for anything mouse.
|
( is_mouse_message(CurrentMessage->Msg.message) ) ) && // Null window for anything mouse.
|
||||||
( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) && CurrentMessage->QS_Flags & QSflags ) ||
|
( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) && CurrentMessage->QS_Flags & QSflags ) ||
|
||||||
( MsgFilterLow <= CurrentMessage->Msg.message && MsgFilterHigh >= CurrentMessage->Msg.message ) ) )
|
( MsgFilterLow <= CurrentMessage->Msg.message && MsgFilterHigh >= CurrentMessage->Msg.message ) ) )
|
||||||
|
@ -2072,7 +2072,7 @@ MsqPeekMessage(IN PTHREADINFO pti,
|
||||||
*/
|
*/
|
||||||
if ( ( !Window || // 1
|
if ( ( !Window || // 1
|
||||||
( Window == PWND_BOTTOM && CurrentMessage->Msg.hwnd == NULL ) || // 2
|
( Window == PWND_BOTTOM && CurrentMessage->Msg.hwnd == NULL ) || // 2
|
||||||
( Window != PWND_BOTTOM && Window->head.h == CurrentMessage->Msg.hwnd ) ) && // 3
|
( Window != PWND_BOTTOM && UserHMGetHandle(Window) == CurrentMessage->Msg.hwnd ) ) && // 3
|
||||||
( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) && CurrentMessage->QS_Flags & QSflags ) ||
|
( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) && CurrentMessage->QS_Flags & QSflags ) ||
|
||||||
( MsgFilterLow <= CurrentMessage->Msg.message && MsgFilterHigh >= CurrentMessage->Msg.message ) ) )
|
( MsgFilterLow <= CurrentMessage->Msg.message && MsgFilterHigh >= CurrentMessage->Msg.message ) ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -403,7 +403,7 @@ VOID FASTCALL
|
||||||
co_IntPaintWindows(PWND Wnd, ULONG Flags, BOOL Recurse)
|
co_IntPaintWindows(PWND Wnd, ULONG Flags, BOOL Recurse)
|
||||||
{
|
{
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
HWND hWnd = Wnd->head.h;
|
HWND hWnd = UserHMGetHandle(Wnd);
|
||||||
HRGN TempRegion = NULL;
|
HRGN TempRegion = NULL;
|
||||||
|
|
||||||
Wnd->state &= ~WNDS_PAINTNOTPROCESSED;
|
Wnd->state &= ~WNDS_PAINTNOTPROCESSED;
|
||||||
|
@ -518,7 +518,7 @@ co_IntPaintWindows(PWND Wnd, ULONG Flags, BOOL Recurse)
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
co_IntUpdateWindows(PWND Wnd, ULONG Flags, BOOL Recurse)
|
co_IntUpdateWindows(PWND Wnd, ULONG Flags, BOOL Recurse)
|
||||||
{
|
{
|
||||||
HWND hWnd = Wnd->head.h;
|
HWND hWnd = UserHMGetHandle(Wnd);
|
||||||
|
|
||||||
if ( Wnd->hrgnUpdate != NULL || Wnd->state & WNDS_INTERNALPAINT )
|
if ( Wnd->hrgnUpdate != NULL || Wnd->state & WNDS_INTERNALPAINT )
|
||||||
{
|
{
|
||||||
|
|
|
@ -761,7 +761,7 @@ co_IntCreateScrollBars(PWND Window)
|
||||||
Size = 3 * (sizeof(SBINFOEX));
|
Size = 3 * (sizeof(SBINFOEX));
|
||||||
if(!(Window->pSBInfoex = ExAllocatePoolWithTag(PagedPool, Size, TAG_SBARINFO)))
|
if(!(Window->pSBInfoex = ExAllocatePoolWithTag(PagedPool, Size, TAG_SBARINFO)))
|
||||||
{
|
{
|
||||||
ERR("Unable to allocate memory for scrollbar information for window %p\n", Window->head.h);
|
ERR("Unable to allocate memory for scrollbar information for window %p\n", UserHMGetHandle(Window));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -769,7 +769,7 @@ co_IntCreateScrollBars(PWND Window)
|
||||||
|
|
||||||
if(!(Window->pSBInfo = DesktopHeapAlloc(Window->head.rpdesk, sizeof(SBINFO))))
|
if(!(Window->pSBInfo = DesktopHeapAlloc(Window->head.rpdesk, sizeof(SBINFO))))
|
||||||
{
|
{
|
||||||
ERR("Unable to allocate memory for scrollbar information for window %p\n", Window->head.h);
|
ERR("Unable to allocate memory for scrollbar information for window %p\n", UserHMGetHandle(Window));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ IntClientShutdown(IN PWND pWindow,
|
||||||
|
|
||||||
if (wParam & MCS_QUERYENDSESSION)
|
if (wParam & MCS_QUERYENDSESSION)
|
||||||
{
|
{
|
||||||
if (!co_IntSendMessage(WndChild->head.h, WM_QUERYENDSESSION, 0, lParams))
|
if (!co_IntSendMessage(UserHMGetHandle(WndChild), WM_QUERYENDSESSION, 0, lParams))
|
||||||
{
|
{
|
||||||
lResult = MCSR_DONOTSHUTDOWN;
|
lResult = MCSR_DONOTSHUTDOWN;
|
||||||
break;
|
break;
|
||||||
|
@ -54,7 +54,7 @@ IntClientShutdown(IN PWND pWindow,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
co_IntSendMessage(WndChild->head.h, WM_ENDSESSION, KillTimers, lParams);
|
co_IntSendMessage(UserHMGetHandle(WndChild), WM_ENDSESSION, KillTimers, lParams);
|
||||||
if (KillTimers)
|
if (KillTimers)
|
||||||
{
|
{
|
||||||
DestroyTimersForWindow(WndChild->head.pti, WndChild);
|
DestroyTimersForWindow(WndChild->head.pti, WndChild);
|
||||||
|
@ -70,14 +70,14 @@ IntClientShutdown(IN PWND pWindow,
|
||||||
/* Send to the caller */
|
/* Send to the caller */
|
||||||
if (wParam & MCS_QUERYENDSESSION)
|
if (wParam & MCS_QUERYENDSESSION)
|
||||||
{
|
{
|
||||||
if (!co_IntSendMessage(pWindow->head.h, WM_QUERYENDSESSION, 0, lParams))
|
if (!co_IntSendMessage(UserHMGetHandle(pWindow), WM_QUERYENDSESSION, 0, lParams))
|
||||||
{
|
{
|
||||||
lResult = MCSR_DONOTSHUTDOWN;
|
lResult = MCSR_DONOTSHUTDOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
co_IntSendMessage(pWindow->head.h, WM_ENDSESSION, KillTimers, lParams);
|
co_IntSendMessage(UserHMGetHandle(pWindow), WM_ENDSESSION, KillTimers, lParams);
|
||||||
if (KillTimers)
|
if (KillTimers)
|
||||||
{
|
{
|
||||||
DestroyTimersForWindow(pWindow->head.pti, pWindow);
|
DestroyTimersForWindow(pWindow->head.pti, pWindow);
|
||||||
|
|
|
@ -540,7 +540,7 @@ NtUserCallTwoParam(
|
||||||
|
|
||||||
if (fAltTab && (Window->style & WS_MINIMIZE))
|
if (fAltTab && (Window->style & WS_MINIMIZE))
|
||||||
{
|
{
|
||||||
MSG msg = { Window->head.h, WM_SYSCOMMAND, SC_RESTORE, 0 };
|
MSG msg = { UserHMGetHandle(Window), WM_SYSCOMMAND, SC_RESTORE, 0 };
|
||||||
MsqPostMessage(Window->head.pti, &msg, FALSE, QS_POSTMESSAGE, 0, 0);
|
MsqPostMessage(Window->head.pti, &msg, FALSE, QS_POSTMESSAGE, 0, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -411,7 +411,7 @@ PostTimerMessages(PWND Window)
|
||||||
(pTmr->pti == pti) &&
|
(pTmr->pti == pti) &&
|
||||||
((pTmr->pWnd == Window) || (Window == NULL)) )
|
((pTmr->pWnd == Window) || (Window == NULL)) )
|
||||||
{
|
{
|
||||||
Msg.hwnd = (pTmr->pWnd) ? pTmr->pWnd->head.h : 0;
|
Msg.hwnd = (pTmr->pWnd ? UserHMGetHandle(pTmr->pWnd) : NULL);
|
||||||
Msg.message = (pTmr->flags & TMRF_SYSTEM) ? WM_SYSTIMER : WM_TIMER;
|
Msg.message = (pTmr->flags & TMRF_SYSTEM) ? WM_SYSTIMER : WM_TIMER;
|
||||||
Msg.wParam = (WPARAM) pTmr->nID;
|
Msg.wParam = (WPARAM) pTmr->nID;
|
||||||
Msg.lParam = (LPARAM) pTmr->pfn;
|
Msg.lParam = (LPARAM) pTmr->pfn;
|
||||||
|
|
|
@ -99,7 +99,7 @@ DceAllocDCE(PWND Window OPTIONAL, DCE_TYPE Type)
|
||||||
}
|
}
|
||||||
DCECount++;
|
DCECount++;
|
||||||
TRACE("Alloc DCE's! %d\n",DCECount);
|
TRACE("Alloc DCE's! %d\n",DCECount);
|
||||||
pDce->hwndCurrent = (Window ? Window->head.h : NULL);
|
pDce->hwndCurrent = (Window ? UserHMGetHandle(Window) : NULL);
|
||||||
pDce->pwndOrg = Window;
|
pDce->pwndOrg = Window;
|
||||||
pDce->pwndClip = Window;
|
pDce->pwndClip = Window;
|
||||||
pDce->hrgnClip = NULL;
|
pDce->hrgnClip = NULL;
|
||||||
|
@ -215,7 +215,7 @@ DceUpdateVisRgn(DCE *Dce, PWND Window, ULONG Flags)
|
||||||
{
|
{
|
||||||
DcxFlags = Flags & ~(DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | DCX_WINDOW);
|
DcxFlags = Flags & ~(DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | DCX_WINDOW);
|
||||||
}
|
}
|
||||||
RgnVisible = DceGetVisRgn(Parent, DcxFlags, Window->head.h, Flags);
|
RgnVisible = DceGetVisRgn(Parent, DcxFlags, UserHMGetHandle(Window), Flags);
|
||||||
}
|
}
|
||||||
else if (Window == NULL)
|
else if (Window == NULL)
|
||||||
{
|
{
|
||||||
|
@ -470,7 +470,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
{
|
{
|
||||||
DceEmpty = Dce;
|
DceEmpty = Dce;
|
||||||
}
|
}
|
||||||
else if (Dce->hwndCurrent == (Wnd ? Wnd->head.h : NULL) &&
|
else if (Dce->hwndCurrent == (Wnd ? UserHMGetHandle(Wnd) : NULL) &&
|
||||||
((Dce->DCXFlags & DCX_CACHECOMPAREMASK) == DcxFlags))
|
((Dce->DCXFlags & DCX_CACHECOMPAREMASK) == DcxFlags))
|
||||||
{
|
{
|
||||||
UpdateClipOrigin = TRUE;
|
UpdateClipOrigin = TRUE;
|
||||||
|
@ -489,7 +489,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
}
|
}
|
||||||
if (Dce == NULL) return NULL;
|
if (Dce == NULL) return NULL;
|
||||||
|
|
||||||
Dce->hwndCurrent = (Wnd ? Wnd->head.h : NULL);
|
Dce->hwndCurrent = (Wnd ? UserHMGetHandle(Wnd) : NULL);
|
||||||
Dce->pwndOrg = Dce->pwndClip = Wnd;
|
Dce->pwndOrg = Dce->pwndClip = Wnd;
|
||||||
}
|
}
|
||||||
else // If we are here, we are POWNED or having CLASS.
|
else // If we are here, we are POWNED or having CLASS.
|
||||||
|
@ -505,7 +505,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
if (!(Dce->DCXFlags & DCX_CACHE))
|
if (!(Dce->DCXFlags & DCX_CACHE))
|
||||||
{
|
{
|
||||||
// Check for Window handle than HDC match for CLASS.
|
// Check for Window handle than HDC match for CLASS.
|
||||||
if (Dce->hwndCurrent == Wnd->head.h)
|
if (Dce->hwndCurrent == UserHMGetHandle(Wnd))
|
||||||
{
|
{
|
||||||
bUpdateVisRgn = FALSE;
|
bUpdateVisRgn = FALSE;
|
||||||
break;
|
break;
|
||||||
|
@ -699,7 +699,7 @@ DceFreeWindowDCE(PWND Window)
|
||||||
{
|
{
|
||||||
pDCE = CONTAINING_RECORD(ListEntry, DCE, List);
|
pDCE = CONTAINING_RECORD(ListEntry, DCE, List);
|
||||||
ListEntry = ListEntry->Flink;
|
ListEntry = ListEntry->Flink;
|
||||||
if ( pDCE->hwndCurrent == Window->head.h &&
|
if ( pDCE->hwndCurrent == UserHMGetHandle(Window) &&
|
||||||
!(pDCE->DCXFlags & DCX_DCEEMPTY) )
|
!(pDCE->DCXFlags & DCX_DCEEMPTY) )
|
||||||
{
|
{
|
||||||
if (!(pDCE->DCXFlags & DCX_CACHE)) /* Owned or Class DCE */
|
if (!(pDCE->DCXFlags & DCX_CACHE)) /* Owned or Class DCE */
|
||||||
|
@ -747,7 +747,7 @@ DceFreeWindowDCE(PWND Window)
|
||||||
* We should change this to TRACE when ReactOS is more stable
|
* We should change this to TRACE when ReactOS is more stable
|
||||||
* (for 1.0?).
|
* (for 1.0?).
|
||||||
*/
|
*/
|
||||||
ERR("[%p] GetDC() without ReleaseDC()!\n", Window->head.h);
|
ERR("[%p] GetDC() without ReleaseDC()!\n", UserHMGetHandle(Window));
|
||||||
DceReleaseDC(pDCE, FALSE);
|
DceReleaseDC(pDCE, FALSE);
|
||||||
}
|
}
|
||||||
pDCE->DCXFlags |= DCX_DCEEMPTY;
|
pDCE->DCXFlags |= DCX_DCEEMPTY;
|
||||||
|
@ -834,7 +834,7 @@ DceResetActiveDCEs(PWND Window)
|
||||||
ListEntry = ListEntry->Flink;
|
ListEntry = ListEntry->Flink;
|
||||||
if (0 == (pDCE->DCXFlags & (DCX_DCEEMPTY|DCX_INDESTROY)))
|
if (0 == (pDCE->DCXFlags & (DCX_DCEEMPTY|DCX_INDESTROY)))
|
||||||
{
|
{
|
||||||
if (Window->head.h == pDCE->hwndCurrent)
|
if (UserHMGetHandle(Window) == pDCE->hwndCurrent)
|
||||||
{
|
{
|
||||||
CurrentWindow = Window;
|
CurrentWindow = Window;
|
||||||
}
|
}
|
||||||
|
|
|
@ -295,7 +295,7 @@ IntWinListChildren(PWND Window)
|
||||||
Index = 0;
|
Index = 0;
|
||||||
for (Child = Window->spwndChild; Child; Child = Child->spwndNext)
|
for (Child = Window->spwndChild; Child; Child = Child->spwndNext)
|
||||||
{
|
{
|
||||||
List[Index++] = Child->head.h;
|
List[Index++] = UserHMGetHandle(Child);
|
||||||
}
|
}
|
||||||
List[Index] = NULL;
|
List[Index] = NULL;
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ IntWinListOwnedPopups(PWND Window)
|
||||||
for (Child = Desktop->spwndChild; Child; Child = Child->spwndNext)
|
for (Child = Desktop->spwndChild; Child; Child = Child->spwndNext)
|
||||||
{
|
{
|
||||||
if (Child->spwndOwner == Window && !IntWndIsDefaultIme(Child))
|
if (Child->spwndOwner == Window && !IntWndIsDefaultIme(Child))
|
||||||
List[Index++] = Child->head.h;
|
List[Index++] = UserHMGetHandle(Child);
|
||||||
}
|
}
|
||||||
List[Index] = NULL;
|
List[Index] = NULL;
|
||||||
|
|
||||||
|
@ -657,10 +657,10 @@ LRESULT co_UserFreeWindow(PWND Window,
|
||||||
/* reset shell window handles */
|
/* reset shell window handles */
|
||||||
if (ThreadData->rpdesk)
|
if (ThreadData->rpdesk)
|
||||||
{
|
{
|
||||||
if (Window->head.h == ThreadData->rpdesk->rpwinstaParent->ShellWindow)
|
if (UserHMGetHandle(Window) == ThreadData->rpdesk->rpwinstaParent->ShellWindow)
|
||||||
ThreadData->rpdesk->rpwinstaParent->ShellWindow = NULL;
|
ThreadData->rpdesk->rpwinstaParent->ShellWindow = NULL;
|
||||||
|
|
||||||
if (Window->head.h == ThreadData->rpdesk->rpwinstaParent->ShellListView)
|
if (UserHMGetHandle(Window) == ThreadData->rpdesk->rpwinstaParent->ShellListView)
|
||||||
ThreadData->rpdesk->rpwinstaParent->ShellListView = NULL;
|
ThreadData->rpdesk->rpwinstaParent->ShellListView = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1342,7 +1342,7 @@ co_UserSetParent(HWND hWndChild, HWND hWndNewParent)
|
||||||
|
|
||||||
if (WndOldParent)
|
if (WndOldParent)
|
||||||
{
|
{
|
||||||
hWndOldParent = WndOldParent->head.h;
|
hWndOldParent = UserHMGetHandle(WndOldParent);
|
||||||
UserDereferenceObject(WndOldParent);
|
UserDereferenceObject(WndOldParent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1579,7 +1579,7 @@ NtUserBuildHwndList(
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
ProbeForWrite(phwndList, sizeof(HWND), 1);
|
ProbeForWrite(phwndList, sizeof(HWND), 1);
|
||||||
*phwndList = Window->head.h;
|
*phwndList = UserHMGetHandle(Window);
|
||||||
phwndList++;
|
phwndList++;
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
@ -1657,7 +1657,7 @@ NtUserBuildHwndList(
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
ProbeForWrite(phwndList, sizeof(HWND), 1);
|
ProbeForWrite(phwndList, sizeof(HWND), 1);
|
||||||
*phwndList = Window->head.h;
|
*phwndList = UserHMGetHandle(Window);
|
||||||
phwndList++;
|
phwndList++;
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
@ -1698,10 +1698,10 @@ static void IntSendParentNotify( PWND pWindow, UINT msg )
|
||||||
{
|
{
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
UserRefObjectCo(pWindow->spwndParent, &Ref);
|
UserRefObjectCo(pWindow->spwndParent, &Ref);
|
||||||
co_IntSendMessage( pWindow->spwndParent->head.h,
|
co_IntSendMessage( UserHMGetHandle(pWindow->spwndParent),
|
||||||
WM_PARENTNOTIFY,
|
WM_PARENTNOTIFY,
|
||||||
MAKEWPARAM( msg, pWindow->IDMenu),
|
MAKEWPARAM( msg, pWindow->IDMenu),
|
||||||
(LPARAM)pWindow->head.h );
|
(LPARAM)UserHMGetHandle(pWindow) );
|
||||||
UserDerefObjectCo(pWindow->spwndParent);
|
UserDerefObjectCo(pWindow->spwndParent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2215,12 +2215,12 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now find the parent and the owner window */
|
/* Now find the parent and the owner window */
|
||||||
hWndParent = pti->rpdesk->pDeskInfo->spwnd->head.h;
|
hWndParent = UserHMGetHandle(pti->rpdesk->pDeskInfo->spwnd);
|
||||||
hWndOwner = NULL;
|
hWndOwner = NULL;
|
||||||
|
|
||||||
if (Cs->hwndParent == HWND_MESSAGE)
|
if (Cs->hwndParent == HWND_MESSAGE)
|
||||||
{
|
{
|
||||||
Cs->hwndParent = hWndParent = pti->rpdesk->spwndMessage->head.h;
|
Cs->hwndParent = hWndParent = UserHMGetHandle(pti->rpdesk->spwndMessage);
|
||||||
}
|
}
|
||||||
else if (Cs->hwndParent)
|
else if (Cs->hwndParent)
|
||||||
{
|
{
|
||||||
|
@ -2470,7 +2470,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
|
|
||||||
Result = co_WinPosGetNonClientSize(Window, &Window->rcWindow, &Window->rcClient);
|
Result = co_WinPosGetNonClientSize(Window, &Window->rcWindow, &Window->rcClient);
|
||||||
//rc = Window->rcWindow;
|
//rc = Window->rcWindow;
|
||||||
//Result = co_IntSendMessageNoWait(Window->head.h, WM_NCCALCSIZE, FALSE, (LPARAM)&rc);
|
//Result = co_IntSendMessageNoWait(UserHMGetHandle(Window), WM_NCCALCSIZE, FALSE, (LPARAM)&rc);
|
||||||
//Window->rcClient = rc;
|
//Window->rcClient = rc;
|
||||||
|
|
||||||
RECTL_vOffsetRect(&Window->rcWindow, MaxPos.x - Window->rcWindow.left,
|
RECTL_vOffsetRect(&Window->rcWindow, MaxPos.x - Window->rcWindow.left,
|
||||||
|
@ -2869,7 +2869,7 @@ BOOLEAN co_UserDestroyWindow(PVOID Object)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
hWnd = Window->head.h;
|
hWnd = UserHMGetHandle(Window);
|
||||||
ti = PsGetCurrentThreadWin32Thread();
|
ti = PsGetCurrentThreadWin32Thread();
|
||||||
|
|
||||||
TRACE("co_UserDestroyWindow(Window = 0x%p, hWnd = 0x%p)\n", Window, hWnd);
|
TRACE("co_UserDestroyWindow(Window = 0x%p, hWnd = 0x%p)\n", Window, hWnd);
|
||||||
|
@ -3078,7 +3078,7 @@ IntFindWindow(PWND Parent,
|
||||||
if(ChildAfter)
|
if(ChildAfter)
|
||||||
{
|
{
|
||||||
/* skip handles before and including ChildAfter */
|
/* skip handles before and including ChildAfter */
|
||||||
while(*phWnd && (*(phWnd++) != ChildAfter->head.h))
|
while(*phWnd && (*(phWnd++) != UserHMGetHandle(ChildAfter)))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3104,7 +3104,7 @@ IntFindWindow(PWND Parent,
|
||||||
(Child->strName.Length < 0xFFFF &&
|
(Child->strName.Length < 0xFFFF &&
|
||||||
!RtlCompareUnicodeString(WindowName, &CurrentWindowName, TRUE)))
|
!RtlCompareUnicodeString(WindowName, &CurrentWindowName, TRUE)))
|
||||||
{
|
{
|
||||||
Ret = Child->head.h;
|
Ret = UserHMGetHandle(Child);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3241,7 +3241,7 @@ NtUserFindWindowEx(HWND hwndParent,
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
if(Parent->head.h == Desktop)
|
if(UserHMGetHandle(Parent) == Desktop)
|
||||||
{
|
{
|
||||||
HWND *List, *phWnd;
|
HWND *List, *phWnd;
|
||||||
PWND TopLevelWindow;
|
PWND TopLevelWindow;
|
||||||
|
@ -3259,7 +3259,7 @@ NtUserFindWindowEx(HWND hwndParent,
|
||||||
if(ChildAfter)
|
if(ChildAfter)
|
||||||
{
|
{
|
||||||
/* skip handles before and including ChildAfter */
|
/* skip handles before and including ChildAfter */
|
||||||
while(*phWnd && (*(phWnd++) != ChildAfter->head.h))
|
while(*phWnd && (*(phWnd++) != UserHMGetHandle(ChildAfter)))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3289,7 +3289,7 @@ NtUserFindWindowEx(HWND hwndParent,
|
||||||
|
|
||||||
if (WindowMatches && ClassMatches)
|
if (WindowMatches && ClassMatches)
|
||||||
{
|
{
|
||||||
Ret = TopLevelWindow->head.h;
|
Ret = UserHMGetHandle(TopLevelWindow);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3297,7 +3297,7 @@ NtUserFindWindowEx(HWND hwndParent,
|
||||||
{
|
{
|
||||||
/* window returns the handle of the top-level window, in case it found
|
/* window returns the handle of the top-level window, in case it found
|
||||||
the child window */
|
the child window */
|
||||||
Ret = TopLevelWindow->head.h;
|
Ret = UserHMGetHandle(TopLevelWindow);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3342,7 +3342,7 @@ PWND FASTCALL UserGetAncestor(PWND Wnd, UINT Type)
|
||||||
{
|
{
|
||||||
PWND WndAncestor, Parent;
|
PWND WndAncestor, Parent;
|
||||||
|
|
||||||
if (Wnd->head.h == IntGetDesktopWindow())
|
if (UserHMGetHandle(Wnd) == IntGetDesktopWindow())
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -3989,10 +3989,10 @@ co_IntSetWindowLongPtr(HWND hWnd, DWORD Index, LONG_PTR NewValue, BOOL Ansi, ULO
|
||||||
|
|
||||||
case GWLP_HWNDPARENT: // LONG_PTR
|
case GWLP_HWNDPARENT: // LONG_PTR
|
||||||
Parent = Window->spwndParent;
|
Parent = Window->spwndParent;
|
||||||
if (Parent && (Parent->head.h == IntGetDesktopWindow()))
|
if (Parent && (UserHMGetHandle(Parent) == IntGetDesktopWindow()))
|
||||||
OldValue = (LONG_PTR) IntSetOwner(Window->head.h, (HWND) NewValue);
|
OldValue = (LONG_PTR)IntSetOwner(UserHMGetHandle(Window), (HWND)NewValue);
|
||||||
else
|
else
|
||||||
OldValue = (LONG_PTR) co_UserSetParent(Window->head.h, (HWND) NewValue);
|
OldValue = (LONG_PTR)co_UserSetParent(UserHMGetHandle(Window), (HWND)NewValue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GWLP_ID: // LONG
|
case GWLP_ID: // LONG
|
||||||
|
|
|
@ -289,7 +289,7 @@ BOOL FASTCALL ActivateOtherWindowMin(PWND Wnd)
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
PTHREADINFO pti = gptiCurrent;
|
PTHREADINFO pti = gptiCurrent;
|
||||||
|
|
||||||
//ERR("AOWM 1 %p\n",Wnd->head.h);
|
//ERR("AOWM 1 %p\n", UserHMGetHandle(Wnd));
|
||||||
ActivePrev = (pti->MessageQueue->spwndActivePrev != NULL);
|
ActivePrev = (pti->MessageQueue->spwndActivePrev != NULL);
|
||||||
FindTopWnd = TRUE;
|
FindTopWnd = TRUE;
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ BOOL FASTCALL ActivateOtherWindowMin(PWND Wnd)
|
||||||
//ERR("ActivateOtherWindowMin Set FG 1\n");
|
//ERR("ActivateOtherWindowMin Set FG 1\n");
|
||||||
co_IntSetForegroundWindow(pWndSetActive);
|
co_IntSetForegroundWindow(pWndSetActive);
|
||||||
UserDerefObjectCo(pWndSetActive);
|
UserDerefObjectCo(pWndSetActive);
|
||||||
//ERR("AOWM 2 Exit Good %p\n",pWndSetActive->head.h);
|
//ERR("AOWM 2 Exit Good %p\n", UserHMGetHandle(pWndSetActive));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (!pWndTemp ) pWndTemp = pWndSetActive;
|
if (!pWndTemp ) pWndTemp = pWndSetActive;
|
||||||
|
@ -357,7 +357,7 @@ BOOL FASTCALL ActivateOtherWindowMin(PWND Wnd)
|
||||||
//ERR("ActivateOtherWindowMin Set FG 2\n");
|
//ERR("ActivateOtherWindowMin Set FG 2\n");
|
||||||
co_IntSetForegroundWindow(pWndSetActive);
|
co_IntSetForegroundWindow(pWndSetActive);
|
||||||
UserDerefObjectCo(pWndSetActive);
|
UserDerefObjectCo(pWndSetActive);
|
||||||
//ERR("AOWM 3 Exit Good %p\n",pWndSetActive->head.h);
|
//ERR("AOWM 3 Exit Good %p\n", UserHMGetHandle(pWndSetActive));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
//ERR("AOWM 4 Bad\n");
|
//ERR("AOWM 4 Bad\n");
|
||||||
|
@ -460,7 +460,7 @@ done:
|
||||||
if (gpqForeground && (!gpqForeground->spwndActive || Wnd == gpqForeground->spwndActive))
|
if (gpqForeground && (!gpqForeground->spwndActive || Wnd == gpqForeground->spwndActive))
|
||||||
{
|
{
|
||||||
/* ReactOS can pass WndTo = NULL to co_IntSetForegroundWindow and returns FALSE. */
|
/* ReactOS can pass WndTo = NULL to co_IntSetForegroundWindow and returns FALSE. */
|
||||||
//ERR("WinPosActivateOtherWindow Set FG 0x%p hWnd %p\n",WndTo, WndTo ? WndTo->head.h : 0);
|
//ERR("WinPosActivateOtherWindow Set FG 0x%p hWnd %p\n", WndTo, WndTo ? UserHMGetHandle(WndTo) : NULL);
|
||||||
if (co_IntSetForegroundWindow(WndTo))
|
if (co_IntSetForegroundWindow(WndTo))
|
||||||
{
|
{
|
||||||
if (WndTo) UserDerefObjectCo(WndTo);
|
if (WndTo) UserDerefObjectCo(WndTo);
|
||||||
|
@ -999,7 +999,7 @@ co_WinPosGetMinMaxInfo(PWND Window, POINT* MaxSize, POINT* MaxPos,
|
||||||
|
|
||||||
if (!EMPTYPOINT(Window->InternalPos.MaxPos)) MinMax.ptMaxPosition = Window->InternalPos.MaxPos;
|
if (!EMPTYPOINT(Window->InternalPos.MaxPos)) MinMax.ptMaxPosition = Window->InternalPos.MaxPos;
|
||||||
|
|
||||||
co_IntSendMessage(Window->head.h, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax);
|
co_IntSendMessage(UserHMGetHandle(Window), WM_GETMINMAXINFO, 0, (LPARAM)&MinMax);
|
||||||
|
|
||||||
/* if the app didn't change the values, adapt them for the current monitor */
|
/* if the app didn't change the values, adapt them for the current monitor */
|
||||||
if ((monitor = UserGetPrimaryMonitor()))
|
if ((monitor = UserGetPrimaryMonitor()))
|
||||||
|
@ -1205,7 +1205,7 @@ co_WinPosDoNCCALCSize(PWND Window, PWINDOWPOS WinPos, RECTL* WindowRect, RECTL*
|
||||||
params.lppos = &winposCopy;
|
params.lppos = &winposCopy;
|
||||||
winposCopy = *WinPos;
|
winposCopy = *WinPos;
|
||||||
|
|
||||||
wvrFlags = co_IntSendMessage(Window->head.h, WM_NCCALCSIZE, TRUE, (LPARAM) ¶ms);
|
wvrFlags = co_IntSendMessage(UserHMGetHandle(Window), WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
|
||||||
|
|
||||||
/* If the application send back garbage, ignore it */
|
/* If the application send back garbage, ignore it */
|
||||||
if (params.rgrc[0].left <= params.rgrc[0].right &&
|
if (params.rgrc[0].left <= params.rgrc[0].right &&
|
||||||
|
@ -1276,8 +1276,8 @@ co_WinPosDoWinPosChanging(PWND Window,
|
||||||
if (!(WinPos->flags & SWP_NOSENDCHANGING)
|
if (!(WinPos->flags & SWP_NOSENDCHANGING)
|
||||||
&& !((WinPos->flags & SWP_AGG_NOCLIENTCHANGE) && (WinPos->flags & SWP_SHOWWINDOW)))
|
&& !((WinPos->flags & SWP_AGG_NOCLIENTCHANGE) && (WinPos->flags & SWP_SHOWWINDOW)))
|
||||||
{
|
{
|
||||||
TRACE("Sending WM_WINDOWPOSCHANGING to hwnd %p flags %04x.\n", Window->head.h,WinPos->flags);
|
TRACE("Sending WM_WINDOWPOSCHANGING to hwnd %p flags %04x.\n", UserHMGetHandle(Window), WinPos->flags);
|
||||||
co_IntSendMessage(Window->head.h, WM_WINDOWPOSCHANGING, 0, (LPARAM) WinPos);
|
co_IntSendMessage(UserHMGetHandle(Window), WM_WINDOWPOSCHANGING, 0, (LPARAM)WinPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate new position and size */
|
/* Calculate new position and size */
|
||||||
|
@ -1370,7 +1370,7 @@ WinPosDoOwnedPopups(PWND Window, HWND hWndInsertAfter)
|
||||||
return hWndInsertAfter;
|
return hWndInsertAfter;
|
||||||
}
|
}
|
||||||
|
|
||||||
Owner = Window->spwndOwner ? Window->spwndOwner->head.h : NULL;
|
Owner = (Window->spwndOwner ? UserHMGetHandle(Window->spwndOwner) : NULL);
|
||||||
|
|
||||||
if (Owner)
|
if (Owner)
|
||||||
{
|
{
|
||||||
|
@ -1491,7 +1491,7 @@ WinPosDoOwnedPopups(PWND Window, HWND hWndInsertAfter)
|
||||||
if (!(Wnd = ValidateHwndNoErr(List[i])))
|
if (!(Wnd = ValidateHwndNoErr(List[i])))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Owner = Wnd->spwndOwner ? Wnd->spwndOwner->head.h : NULL;
|
Owner = (Wnd->spwndOwner ? UserHMGetHandle(Wnd->spwndOwner) : NULL);
|
||||||
|
|
||||||
if (Owner != UserHMGetHandle(Window)) continue;
|
if (Owner != UserHMGetHandle(Window)) continue;
|
||||||
|
|
||||||
|
@ -1671,7 +1671,7 @@ WinPosFixupFlags(WINDOWPOS *WinPos, PWND Wnd)
|
||||||
* itself.
|
* itself.
|
||||||
*/
|
*/
|
||||||
if ((WinPos->hwnd == WinPos->hwndInsertAfter) ||
|
if ((WinPos->hwnd == WinPos->hwndInsertAfter) ||
|
||||||
((InsAfterWnd->spwndNext) && (WinPos->hwnd == InsAfterWnd->spwndNext->head.h)))
|
((InsAfterWnd->spwndNext) && (WinPos->hwnd == UserHMGetHandle(InsAfterWnd->spwndNext))))
|
||||||
{
|
{
|
||||||
WinPos->flags |= SWP_NOZORDER;
|
WinPos->flags |= SWP_NOZORDER;
|
||||||
}
|
}
|
||||||
|
@ -1822,7 +1822,7 @@ co_WinPosSetWindowPos(
|
||||||
|
|
||||||
bPointerInWindow = IntPtInWindow(Window, gpsi->ptCursor.x, gpsi->ptCursor.y);
|
bPointerInWindow = IntPtInWindow(Window, gpsi->ptCursor.x, gpsi->ptCursor.y);
|
||||||
|
|
||||||
WinPos.hwnd = Window->head.h;
|
WinPos.hwnd = UserHMGetHandle(Window);
|
||||||
WinPos.hwndInsertAfter = WndInsertAfter;
|
WinPos.hwndInsertAfter = WndInsertAfter;
|
||||||
WinPos.x = x;
|
WinPos.x = x;
|
||||||
WinPos.y = y;
|
WinPos.y = y;
|
||||||
|
@ -1870,7 +1870,7 @@ co_WinPosSetWindowPos(
|
||||||
|
|
||||||
Ancestor = UserGetAncestor(Window, GA_PARENT);
|
Ancestor = UserGetAncestor(Window, GA_PARENT);
|
||||||
if ( (WinPos.flags & (SWP_NOZORDER | SWP_HIDEWINDOW | SWP_SHOWWINDOW)) != SWP_NOZORDER &&
|
if ( (WinPos.flags & (SWP_NOZORDER | SWP_HIDEWINDOW | SWP_SHOWWINDOW)) != SWP_NOZORDER &&
|
||||||
Ancestor && Ancestor->head.h == IntGetDesktopWindow() )
|
Ancestor && UserHMGetHandle(Ancestor) == IntGetDesktopWindow() )
|
||||||
{
|
{
|
||||||
WinPos.hwndInsertAfter = WinPosDoOwnedPopups(Window, WinPos.hwndInsertAfter);
|
WinPos.hwndInsertAfter = WinPosDoOwnedPopups(Window, WinPos.hwndInsertAfter);
|
||||||
}
|
}
|
||||||
|
@ -1962,7 +1962,7 @@ co_WinPosSetWindowPos(
|
||||||
RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN);
|
RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN);
|
||||||
|
|
||||||
if (UserIsDesktopWindow(Window->spwndParent))
|
if (UserIsDesktopWindow(Window->spwndParent))
|
||||||
co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (WPARAM)Window->head.h, 0);
|
co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (WPARAM)UserHMGetHandle(Window), 0);
|
||||||
|
|
||||||
Window->style &= ~WS_VISIBLE; //IntSetStyle( Window, 0, WS_VISIBLE );
|
Window->style &= ~WS_VISIBLE; //IntSetStyle( Window, 0, WS_VISIBLE );
|
||||||
Window->head.pti->cVisWindows--;
|
Window->head.pti->cVisWindows--;
|
||||||
|
@ -1974,7 +1974,7 @@ co_WinPosSetWindowPos(
|
||||||
{
|
{
|
||||||
if ((Window->style & WS_POPUP) && (Window->ExStyle & WS_EX_APPWINDOW))
|
if ((Window->style & WS_POPUP) && (Window->ExStyle & WS_EX_APPWINDOW))
|
||||||
{
|
{
|
||||||
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0);
|
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)UserHMGetHandle(Window), 0);
|
||||||
if (!(WinPos.flags & SWP_NOACTIVATE))
|
if (!(WinPos.flags & SWP_NOACTIVATE))
|
||||||
UpdateShellHook(Window);
|
UpdateShellHook(Window);
|
||||||
}
|
}
|
||||||
|
@ -1985,7 +1985,7 @@ co_WinPosSetWindowPos(
|
||||||
{
|
{
|
||||||
if (!UserIsDesktopWindow(Window))
|
if (!UserIsDesktopWindow(Window))
|
||||||
{
|
{
|
||||||
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0);
|
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)UserHMGetHandle(Window), 0);
|
||||||
if (!(WinPos.flags & SWP_NOACTIVATE))
|
if (!(WinPos.flags & SWP_NOACTIVATE))
|
||||||
UpdateShellHook(Window);
|
UpdateShellHook(Window);
|
||||||
}
|
}
|
||||||
|
@ -2317,7 +2317,7 @@ co_WinPosSetWindowPos(
|
||||||
|
|
||||||
/* And last, send the WM_WINDOWPOSCHANGED message */
|
/* And last, send the WM_WINDOWPOSCHANGED message */
|
||||||
|
|
||||||
TRACE("\tstatus hwnd %p flags = %04x\n",Window?Window->head.h:NULL,WinPos.flags & SWP_AGG_STATUSFLAGS);
|
TRACE("\tstatus hwnd %p flags = %04x\n", Window ? UserHMGetHandle(Window) : NULL, WinPos.flags & SWP_AGG_STATUSFLAGS);
|
||||||
|
|
||||||
if (((WinPos.flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE)
|
if (((WinPos.flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE)
|
||||||
&& !((flags & SWP_AGG_NOCLIENTCHANGE) && (flags & SWP_SHOWWINDOW)))
|
&& !((flags & SWP_AGG_NOCLIENTCHANGE) && (flags & SWP_SHOWWINDOW)))
|
||||||
|
@ -2370,7 +2370,7 @@ co_WinPosGetNonClientSize(PWND Window, RECT* WindowRect, RECT* ClientRect)
|
||||||
ASSERT_REFS_CO(Window);
|
ASSERT_REFS_CO(Window);
|
||||||
|
|
||||||
*ClientRect = *WindowRect;
|
*ClientRect = *WindowRect;
|
||||||
Result = co_IntSendMessageNoWait(Window->head.h, WM_NCCALCSIZE, FALSE, (LPARAM) ClientRect);
|
Result = co_IntSendMessageNoWait(UserHMGetHandle(Window), WM_NCCALCSIZE, FALSE, (LPARAM)ClientRect);
|
||||||
|
|
||||||
FixClientRect(ClientRect, WindowRect);
|
FixClientRect(ClientRect, WindowRect);
|
||||||
|
|
||||||
|
@ -2424,7 +2424,7 @@ co_WinPosMinMaximize(PWND Wnd, UINT ShowFlag, RECT* NewPos)
|
||||||
wpl.length = sizeof(wpl);
|
wpl.length = sizeof(wpl);
|
||||||
IntGetWindowPlacement( Wnd, &wpl );
|
IntGetWindowPlacement( Wnd, &wpl );
|
||||||
|
|
||||||
if (co_HOOK_CallHooks( WH_CBT, HCBT_MINMAX, (WPARAM)Wnd->head.h, ShowFlag))
|
if (co_HOOK_CallHooks(WH_CBT, HCBT_MINMAX, (WPARAM)UserHMGetHandle(Wnd), ShowFlag))
|
||||||
{
|
{
|
||||||
ERR("WinPosMinMaximize WH_CBT Call Hook return!\n");
|
ERR("WinPosMinMaximize WH_CBT Call Hook return!\n");
|
||||||
return SWP_NOSIZE | SWP_NOMOVE;
|
return SWP_NOSIZE | SWP_NOMOVE;
|
||||||
|
@ -2439,7 +2439,7 @@ co_WinPosMinMaximize(PWND Wnd, UINT ShowFlag, RECT* NewPos)
|
||||||
case SW_FORCEMINIMIZE:
|
case SW_FORCEMINIMIZE:
|
||||||
return SWP_NOSIZE | SWP_NOMOVE;
|
return SWP_NOSIZE | SWP_NOMOVE;
|
||||||
}
|
}
|
||||||
if (!co_IntSendMessageNoWait(Wnd->head.h, WM_QUERYOPEN, 0, 0))
|
if (!co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_QUERYOPEN, 0, 0))
|
||||||
{
|
{
|
||||||
return(SWP_NOSIZE | SWP_NOMOVE);
|
return(SWP_NOSIZE | SWP_NOMOVE);
|
||||||
}
|
}
|
||||||
|
@ -2582,7 +2582,7 @@ co_WinPosShowWindow(PWND Wnd, INT Cmd)
|
||||||
style = Wnd->style;
|
style = Wnd->style;
|
||||||
|
|
||||||
TRACE("co_WinPosShowWindow START hwnd %p Cmd %d usicmd %u\n",
|
TRACE("co_WinPosShowWindow START hwnd %p Cmd %d usicmd %u\n",
|
||||||
Wnd->head.h, Cmd, pti->ppi->usi.wShowWindow);
|
UserHMGetHandle(Wnd), Cmd, pti->ppi->usi.wShowWindow);
|
||||||
|
|
||||||
if ( pti->ppi->usi.dwFlags & STARTF_USESHOWWINDOW )
|
if ( pti->ppi->usi.dwFlags & STARTF_USESHOWWINDOW )
|
||||||
{
|
{
|
||||||
|
@ -2741,10 +2741,10 @@ co_WinPosShowWindow(PWND Wnd, INT Cmd)
|
||||||
|
|
||||||
if ((ShowFlag != WasVisible || Cmd == SW_SHOWNA) && Cmd != SW_SHOWMAXIMIZED && !(Swp & SWP_STATECHANGED))
|
if ((ShowFlag != WasVisible || Cmd == SW_SHOWNA) && Cmd != SW_SHOWMAXIMIZED && !(Swp & SWP_STATECHANGED))
|
||||||
{
|
{
|
||||||
co_IntSendMessageNoWait(Wnd->head.h, WM_SHOWWINDOW, ShowFlag, 0);
|
co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_SHOWWINDOW, ShowFlag, 0);
|
||||||
#if 0 // Fix wine msg test_SetParent:WmSetParentSeq_1:2
|
#if 0 // Fix wine msg test_SetParent:WmSetParentSeq_1:2
|
||||||
if (!(Wnd->state2 & WNDS2_WIN31COMPAT)) // <------------- XP sets this bit!
|
if (!(Wnd->state2 & WNDS2_WIN31COMPAT)) // <------------- XP sets this bit!
|
||||||
co_IntSendMessageNoWait(Wnd->head.h, WM_SETVISIBLE, ShowFlag, 0);
|
co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_SETVISIBLE, ShowFlag, 0);
|
||||||
#endif
|
#endif
|
||||||
if (!VerifyWnd(Wnd)) return WasVisible;
|
if (!VerifyWnd(Wnd)) return WasVisible;
|
||||||
}
|
}
|
||||||
|
@ -2914,7 +2914,7 @@ co_WinPosSearchChildren(
|
||||||
|
|
||||||
if (ScopeWin->head.pti == PsGetCurrentThreadWin32Thread())
|
if (ScopeWin->head.pti == PsGetCurrentThreadWin32Thread())
|
||||||
{
|
{
|
||||||
*HitTest = (USHORT)co_IntSendMessage(ScopeWin->head.h, WM_NCHITTEST, 0, MAKELONG(Point->x, Point->y));
|
*HitTest = (USHORT)co_IntSendMessage(UserHMGetHandle(ScopeWin), WM_NCHITTEST, 0, MAKELONG(Point->x, Point->y));
|
||||||
|
|
||||||
if ((*HitTest) == (USHORT)HTTRANSPARENT)
|
if ((*HitTest) == (USHORT)HTTRANSPARENT)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue