how to identify columns no in ListView Ctrl when its header is clicked

[b][red]This message was edited by blueman at 2002-9-1 21:2:31[/red][/b][hr]
I wonder how i can identify the correct column number of a list view control when its header is clicked. I used OnColumnClick event(message) and I have ColumnHeader as LPDISPATCH in the message handling function, but I couldn't use this (ColumnHeader) to indentify what column number was clicked by user. Here is the listing of my message handling function: I couldn't do anything with ColumnHeader to get the column index number or name.

void CTailorListDlg::OnColumnClickListviewctrlTailor(LPDISPATCH ColumnHeader)
// TODO: Add your control notification handler code here

So anyone can help me solve this problem?

Thanks anyone who solve this problem.


  • See if you could get the columnheader text. If yes, then you could compare the header text and determine the corresponding column.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion