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?

    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);
WM_NOTIFY message (Winuser.h) - Win32 apps | Microsoft DocsLVN_COLUMNCLICK notification code (Commctrl.h) - Win32 apps | Microsoft Docs