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
to set extended styles.
I used OllyDbg to track, the problem is on
In Xp, it runs OK and returns the index of the item I selected (by dbclick).
But in 2000, it returns FALSE (0FFFFFFFFh)
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)
Hi dyna
I dont have any clue.
Moved it to main.
KetilO
I dont have any clue.
Moved it to main.
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.
thank u 4 ur help, Sehiroth3
i add LVS_EX_TWOCLICKACTIVATE, and it works OK.
i add LVS_EX_TWOCLICKACTIVATE, and it works OK.
you should use
to get SELECTED item's index. otherwise you get HOT item's index (which may not be teh same).
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).
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:
i think maybe there is not only one way to do that.
using MASM in GDI programming is too unefficient :cry: