On 1/15/2013 01:15, Daniel Jelinski wrote:
2013/1/14 Nikolay Sivov bunglehead@gmail.com:
On 1/15/2013 00:53, Daniel Jelinski wrote:
- if(lParam == -1)
return LISTVIEW_SetIconSpacing(infoPtr, -1, -1);
- return LISTVIEW_SetIconSpacing(infoPtr, LOWORD(lParam),
HIWORD(lParam));
Why do you need to handle this case specially? If it's -1 for 64bit comctl32 it should give you the same values with HIWORD/LOWORD as it does for 32bit.
On 64bit the behavior with lParam=0xFFFFFFFF is different from that with lParam=-1. HIWORD/LOWORD values are the same, so without this special case they would behave the same way.
So on 64bit you want to distinguish two cases: - ~0 value of lParam - you use it to reset to default values; - all other values including 0xffffffff that will result in the same call with both args being -1.
So result is the same, right?
Your test:
+#ifdef _WIN64
- ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, 0xBAADF00DDEADBEEFLL);
- expect(0xFFFF, LOWORD(ret));
- expect(0xFFFF, HIWORD(ret));
- ret2 = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0);
- ok((LONG)0xDEADBEEF == ret2, "Expected FFFFFFFFDEADBEEF, got %p\n", (void*)ret2);
- ret2 = SendMessage(hwnd, LVM_SETICONSPACING, 0, -1);
- ok(0xDEADBEEF == ret2, "Expected 00000000DEADBEEF, got %p\n", (void*)ret2);
+#endif
shows that higher DWORD is simply ignored, so value -1 and MAKELONG(-1, -1) should give same results.