richedit: Mask window id on WM_COMMAND notifications.

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


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

> "Dylan Smith" <dylan.ah.smith at gmail.com> 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...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20090103/3ca29b89/attachment.htm 


More information about the wine-devel mailing list