richedit: Mask window id on WM_COMMAND notifications.

Dylan Smith dylan.ah.smith at
Sat Jan 3 00:10:32 CST 2009

On Sat, Jan 3, 2009 at 12:37 AM, Dmitry Timoshkov <dmitry at>wrote:

> "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.

Alright, I'll change that before resending.

> Also, have you
> tested what happens if real window id is larger than a 16-bit value,
> or just a negative 16-bit one?

I was just running the test application provided in Bug 16349 and I found
while debugging that GetWindowLongW(hWnd, GWLP_ID) was returning 0x20034
which is larger than a 16-bit value.  That doesn't seem like a negative
16-bit value.

Besides that I know very little about what this value normally would be, and
don't know how I would test this in the test suite, since this doesn't
always occur (e.g. I got GetWindowLongW(hWnd, GWLP_ID)=0x7d1 when running
wine wordpad).
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the wine-devel mailing list