Re: comctl32/listview: fix icon spacing calculation
On 1/14/2013 00:00, Daniel Jelinski wrote:
-static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy) +static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, WORD cx, WORD cy) I don't really like it as WORD, what it really is a int value with special meaning reserved for -1. For 64bits and lParam == -1 you'll still get two -1 values.
+ /* LPARAM = -1 - restore default processing */ + ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(-1,-1)); +todo_wine + expect(100, LOWORD(ret)); + expect(0xFFFF, HIWORD(ret)); + + /* NOTE: -1 is not the same as MAKELPARAM(-1,-1) in 64bit listview */ + if(sizeof(LPARAM) == 8) + { + ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, -1); +todo_wine { + expect(0xFFFF, LOWORD(ret)); + expect(0xFFFF, HIWORD(ret)); + } + } That means you should just use lParam == -1. Also this message is supposed to use MAKELONG apparently, not sure if it makes a difference.
participants (1)
-
Nikolay Sivov