It's a bit complicated. To handle these messages, you'll need to subclass
the ListView class and override the WndProc method. Mouse clicks on the
listview column header come as WM_NOTIFY messages. The notification of
interest is probably HDN_MOUSEUP.
You can find the values of the above constants from the platform SDK
headers. The structures associated with these messages are also described in
the SDK headers.