I have a Listview with several columns.
How do I determine if a header is DC'ed, and which one it was?
I'm probably missing something here.
Thanks in advance!
If you mean double-clicked or even just plain clicked then
which = @lpNMV.iSubItem
in the LVN_COLUMNCLICK routine works. On the Designer just
double-click the header and it should create the routine for you.
If you need further help, just ask.
Nice one, Paul!
Works a treat.
Hi Paul
Sorry to be dense but what do you mean by LVN_COLUMNCLICK.. I would like to write a function that will return the column header clicked on so I can sort the list view depenting on th column.
Bert
Something like:
Function FORM1_LV1_LVN_COLUMNCLICK ( _
ControlIndex As Long, _ ' index in Control Array
hWndForm As Dword, _ ' handle of Form
hWndControl As Dword, _ ' handle of Control
ByVal lpNMV As NM_LISTVIEW Ptr _ ' pointer to NM_LISTVIEW
) As Long
If Sorting = %FALSE Then
which& = @lpNMV.iSubItem
SortArray which&
End If
End Function
Firefly creates the function outline for you if you click on it in the top right selection list.
Thanx
I just couln't see the columnclick event in the listview
bert