Originally posted by: WilliamXu
^^
ReplyOriginally posted by: Latha
HI,
I have 2 sortable list controls in the same
dialog and would like to be able to sort on clicking each of their headers. How will i have to declare the OnheaderClicked() function?? it'll handle only for one of the headers,right?? please let me know if u have any suggestions, I am kind of stuck on this.
thanks,
latha
Originally posted by: rob
Thanks for this column... I was getting nowhere with other websites (and especially the MSDN) in my effort to get CListCtrls to sort. Why is the class wizard so broken?? Anyway, thanks, keep up the good work.
Originally posted by: Ivan Soroka
instead
ON_NOTIFY(HDN_ITEMCLICKA, 0, OnHeaderClicked)
void CMyListCtrl::OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult)
// ** Your code
However, you can handle reflected message LVN_COLUMNCLICK.
ON_NOTIFY_REFLECT(LVN_COLUMNCLICK, OnColumnclick)
ON_NOTIFY(HDN_ITEMCLICKW, 0, OnHeaderClicked)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
// ...
*pResult = 0;
}
Originally posted by: Nopparut Intanil
Thank you very much
ReplyOriginally posted by: Keri
"Since the HDN_ITEMCLICK is a notification from the header control to the list view control, it is a direct notification and not a reflected one."
Thank you, Thank you, Thank you, Thank you, Thank you!!!! For this VERY important piece of info. Since i was mapping my HDN_ notifications as reflected messages, I wasn't getting them, and I couldn't figure out why...for HOURS. THANKS!!!!!!
Originally posted by: alan
I went through about 10 samples before I got this one to work. I was gettng frustrated because there weren't any example programs which gives me a better view of the over all picture.
I kept getting problems with CALLBACK functions which I don't understand very well. This works for what I want to do which is sort text. I had some part numbers in columns with letters and numbers and it worked for them too.
Originally posted by: Trey
Is it possible to send a message to the list control from a menu item that will tell the list control to sort on a specific column? Basically, send the OnNotify message manually.
Originally posted by: Andon M. Coleman
How would I identify which Header Control is being clicked on when I have 3 Listviews in the same Dialog?
Thanks,
Andon M. Coleman
Reply