Hi KetilO,there is a strange problem about Listview Control in my program.

That is when double click on one item, the item should be deleted from Listview. It works OK on WindowsXP, but always wrong under Windows2000. The Listview control is report style. And use
invoke SendMessage,hIDC_LSV_LOCATE,LVM_SETEXTENDEDLISTVIEWSTYLE,LVS_EX_FULLROWSELECT or LVS_EX_GRIDLINES,LVS_EX_FULLROWSELECT or LVS_EX_GRIDLINES

to set extended styles.

I used OllyDbg to track, the problem is on
invoke	SendMessage,hIDC_LSV_LOCATE,LVM_GETHOTITEM,0,0

In Xp, it runs OK and returns the index of the item I selected (by dbclick).
But in 2000, it returns FALSE (0FFFFFFFFh)
Posted on 2005-01-16 01:55:29 by dyna
Hi dyna

I dont have any clue.
Moved it to main.

KetilO
Posted on 2005-01-16 05:17:28 by KetilO
You haven't enabled hot tracking. Use the value at 12 added to the address in lParam instead, which is the item you double clicked.
Posted on 2005-01-16 09:28:23 by Sephiroth3
thank u 4 ur help, Sehiroth3
i add LVS_EX_TWOCLICKACTIVATE, and it works OK.
Posted on 2005-01-16 21:36:14 by dyna
you should use
call	SendMessage, [hwndlist], LVM_GETNEXTITEM, -1, LVNI_SELECTED

to get SELECTED item's index. otherwise you get HOT item's index (which may not be teh same).
Posted on 2005-01-17 01:52:08 by ti_mo_n
thx ti_mo_n, i'll try
i think maybe there is not only one way to do that.

using MASM in GDI programming is too unefficient :cry:
Posted on 2005-01-17 02:22:26 by dyna