ui/win32/list.c

changeset 1034
330b415910bd
parent 998
55508508ba4d
equal deleted inserted replaced
1033:eda1ff20cb27 1034:330b415910bd
189 } 189 }
190 190
191 static UiListSelection listview_get_selection2(HWND hwnd) { 191 static UiListSelection listview_get_selection2(HWND hwnd) {
192 UiListSelection sel = { 0, NULL }; 192 UiListSelection sel = { 0, NULL };
193 193
194 CX_ARRAY_DECLARE(int, indices); 194 CX_ARRAY(int, indices);
195 cx_array_initialize(indices, 8); 195 cx_array_init(indices, 8);
196 196
197 int index = -1; 197 int index = -1;
198 while ((index = ListView_GetNextItem(hwnd, index, LVNI_SELECTED)) != -1) { 198 while ((index = ListView_GetNextItem(hwnd, index, LVNI_SELECTED)) != -1) {
199 cx_array_simple_add(indices, index); 199 cx_array_add(indices, index);
200 } 200 }
201 201
202 if (indices_size > 0) { 202 if (indices.size > 0) {
203 sel.rows = indices; 203 sel.rows = indices.data;
204 sel.count = indices_size; 204 sel.count = indices.size;
205 } 205 }
206 206
207 return sel; 207 return sel;
208 } 208 }
209 209

mercurial