i have a listview with, for example, 5 items ... if the user selects 3rd item ?how i can know it?. I only need to know the "position" .. 1,2,3,4 or 5 ...
Posted on 2002-02-06 09:53:50 by unknow
I use the WM_NOTIFY message for this job ,in the winproc:

.ELSEIF uMsg==WM_COMMAND
mov eax,wParam
....
....

.ELSEIF uMsg==WM_NOTIFY
mov edi,lParam
assume edi:ptr NMHDR
mov eax,.hwndFrom
.IF eax==hWnd_ListView
mov eax,.code
.IF eax==NM_CLICK
invoke SendMessageA, hWnd_ListView,LVM_GETNEXTITEM,-1, LVNI_SELECTED
.IF eax!=-1
>>>>> eax , now is the item position <<<<<<<<<
.ENDIF
.ENDIF
.ENDIF

hWnd_ListView -> is the handle of your ListView.
Posted on 2002-02-06 12:43:56 by TheMorlok