comparison win/dw.c @ 161:c555d06b6c93

Allow tree-select signal to work on container controls.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 17 Nov 2002 11:51:30 +0000
parents a07dd2e819f3
children d03716228b7f
comparison
equal deleted inserted replaced
160:76bc6b4e8b79 161:c555d06b6c93
1342 ptrs = (void **)tvi.lParam; 1342 ptrs = (void **)tvi.lParam;
1343 1343
1344 } 1344 }
1345 containercontextfunc(tmp->window, ptrs ? (char *)ptrs[0] : NULL, x, y, tmp->data, ptrs ? ptrs[1] : NULL); 1345 containercontextfunc(tmp->window, ptrs ? (char *)ptrs[0] : NULL, x, y, tmp->data, ptrs ? ptrs[1] : NULL);
1346 tmp = NULL; 1346 tmp = NULL;
1347 }
1348 }
1349 }
1350 else if(strnicmp(tmpbuf, WC_LISTVIEW, strlen(WC_LISTVIEW)+1)==0)
1351 {
1352 if(tem->hdr.code == LVN_ITEMCHANGED && tmp->message == TVN_SELCHANGED)
1353 {
1354 if(tmp->window == tem->hdr.hwndFrom)
1355 {
1356 LV_ITEM lvi;
1357 int iItem;
1358
1359 iItem = ListView_GetNextItem(tmp->window, -1, LVNI_FOCUSED);
1360
1361 memset(&lvi, 0, sizeof(LV_ITEM));
1362
1363 if(iItem > -1)
1364 {
1365 int (*containerselectfunc)(HWND, char *, void *) = tmp->signalfunction;
1366
1367 lvi.iItem = iItem;
1368 lvi.mask = LVIF_PARAM;
1369
1370 ListView_GetItem(tmp->window, &lvi);
1371
1372 /* Seems to be having lParam as 1 which really sucks */
1373 if(lvi.lParam < 100)
1374 lvi.lParam = 0;
1375
1376 containerselectfunc(tmp->window, (char *)lvi.lParam, tmp->data);
1377 tmp = NULL;
1378 }
1347 } 1379 }
1348 } 1380 }
1349 } 1381 }
1350 } 1382 }
1351 } 1383 }