Hello

I read it on MSDN that it should be sent through WM_NOTIFY.

And that the iSubItem number has to be put in a NMLISTVIEW structure.

But where do I put the NMLISTVIEW structure to tell it to which column to click on?

Code:
NMHDR nmh;
nmh.code = LVN_COLUMNCLICK;    // Message type defined by control.
nmh.idFrom = GetDlgCtrlID(hListView);
nmh.hwndFrom = hListView;
 
NMLISTVIEW nmlv = {0};
nmlv.iItem = -1;
nmlv.iSubItem = 1;
 
SendMessage(hwnd, WM_NOTIFY, nmh.idFrom,(LPARAM)&nmh);
https://docs.microsoft.com/en-us/win...rols/wm-notify

https://docs.microsoft.com/en-us/win...vn-columnclick