[NTUSER][USER32] Set WM_CONTEXTMENU's wParam to the child window's handle

Cherry-picked from 3af8415ca9

CORE-18801
This commit is contained in:
Roy Tam 2023-01-21 11:42:48 +08:00 committed by Stanislav Motylkov
parent 5b3b4151e2
commit 0bab3a1048
2 changed files with 3 additions and 3 deletions

View File

@ -738,7 +738,7 @@ IntDefWindowProc(
{
if (Wnd->style & WS_CHILD)
{
co_IntSendMessage(UserHMGetHandle(IntGetParent(Wnd)), Msg, wParam, lParam);
co_IntSendMessage(UserHMGetHandle(IntGetParent(Wnd)), Msg, (WPARAM)UserHMGetHandle(Wnd), lParam);
}
else
{

View File

@ -390,11 +390,11 @@ User32DefWindowProc(HWND hWnd,
{
if (bUnicode)
{
SendMessageW(GetParent(hWnd), Msg, wParam, lParam);
SendMessageW(GetParent(hWnd), Msg, (WPARAM)hWnd, lParam);
}
else
{
SendMessageA(GetParent(hWnd), WM_CONTEXTMENU, wParam, lParam);
SendMessageA(GetParent(hWnd), Msg, (WPARAM)hWnd, lParam);
}
}
else