0

I have used the list control with header checkbox. used block line in BEGIN_MESSAGE_MAP() ON_NOTIFY(HDN_ITEMSTATEICONCLICK,IDC_ONLINE_USERS_LIST, OnHeaderItemStateIconClick)

but OnHeaderItemStateIconClick not getting called when i click on header checkbox.

  • 2
    Please show a [mcve]. – IInspectable Jun 06 '18 at 07:57
  • Where do you try to catch `HDN_ITEMSTATEICONCLICK`? This notification is send to the parent of the header control, which is the listview control. If you try to catch it in the parent dialog of the listview control, you won't receive this notification. Catch `LVN_COLUMNCLICK` in the parent dialog or create a class derived from `CListCtrl` and catch `HDN_ITEMSTATEICONCLICK` there. – zett42 Jun 06 '18 at 11:00
  • Just read under [LVN_COLUMNCLICK](https://msdn.microsoft.com/en-us/library/windows/desktop/bb774804(v=vs.85).aspx): "_Using header control formats such as HDF_CHECKBOX to modify the format of column headers in a list-view control causes the control to send the HDN_ITEMSTATEICONCLICK notification code instead of LVN_COLUMNCLICK when a header item is clicked."_ -- so we need to know which header item flags you are using. – zett42 Jun 06 '18 at 11:23

0 Answers0