richedit: Mask window id on WM_COMMAND notifications.

Dmitry Timoshkov dmitry at
Fri Jan 2 23:37:53 CST 2009

"Dylan Smith" <dylan.ah.smith at> wrote:

> -  SendMessageA(GetParent(hWnd), WM_COMMAND, (nCode<<16)|GetWindowLongW(hWnd, GWLP_ID), (LPARAM)hWnd);
> +  SendMessageA(GetParent(hWnd), WM_COMMAND, (nCode<<16)|(0xffff & GetWindowLongW(hWnd, GWLP_ID)), (LPARAM)hWnd);

MAKEWPARAM and LOWORD are supposed to be used here. Also, have you
tested what happens if real window id is larger than a 16-bit value,
or just a negative 16-bit one?


More information about the wine-devel mailing list