OK, further research has revealed the following:
It does not appear that any messages intended specifically for the header control are sent to the listview-control proc. I checked for any such messages (where the handle was the header handle, not the listview handle) and found none. So it appears that normally (i.e., if the header isn't subclassed), these messages are handled internally by the GDI. In other words, the listview proc only receives messages for the listview control (which may include the header control, but not using a separate handle for that control).
(By the way, I'm not sure why I would want to subclass the listview as you suggested: don't all its messages come through its parent's window proc anyhow?)
OK, when I subclass the header control, I get the following messages (sent to a log file):
Hdr. proc(): msg=WM_WINDOWPOSCHANGING
Hdr. proc(): msg=WM_WINDOWPOSCHANGING
Hdr. proc(): msg=WM_WINDOWPOSCHANGING
Hdr. proc(): msg=WM_WINDOWPOSCHANGING
Hdr. proc(): msg=WM_WINDOWPOSCHANGING
Hdr. proc(): msg=WM_WINDOWPOSCHANGING
Hdr. proc(): msg=WM_WINDOWPOSCHANGING
Hdr. proc(): msg=WM_WINDOWPOSCHANGING
Hdr. proc(): msg=WM_PAINT
Hdr. proc(): msg=WM_NCPAINT
Hdr. proc(): msg=WM_ERASEBKGND
Actually, these are only the "known" messages (i.e., those that are in our windows.inc file). There were a bunch of other messages captured, with values 1205, 1207. 120A, 120B and 120F (all hex). What these messages are, I have no idea.
Unfortunately, the header proc receives no WM_NOTIFY messages at all. So I don't see how I can possibly change colors in the header. It must be possible, though, since there are plenty of applications that do just that.
Any more ideas?
==============================================
Hmm, interesting: when I subclass the listview, here are the messages I get (ignore the "hdr. proc()"--that's just the text I used in my message-capturing code):
Hdr. proc(): unknown msg (0x1036)
Hdr. proc(): unknown msg (0x101B)
Hdr. proc(): unknown msg (0x101B)
Hdr. proc(): unknown msg (0x101B)
Hdr. proc(): unknown msg (0x1007)
Hdr. proc(): unknown msg (0x1007)
Hdr. proc(): unknown msg (0x1007)
Hdr. proc(): msg=WM_USER
Hdr. proc(): msg=WM_PAINT
Hdr. proc(): msg=WM_NOTIFY
Hdr. proc(): msg=WM_ERASEBKGND
Hdr. proc(): msg=WM_TIMER
Hdr. proc(): msg=WM_NCHITTEST
Hdr. proc(): msg=WM_SETCURSOR
Hdr. proc(): msg=WM_MOUSEMOVE
Hdr. proc(): msg=WM_NCHITTEST
Hdr. proc(): msg=WM_SETCURSOR
Hdr. proc(): msg=WM_MOUSEMOVE
Hdr. proc(): msg=WM_NCHITTEST
Hdr. proc(): msg=WM_SETCURSOR
Hdr. proc(): msg=WM_MOUSEMOVE
Hdr. proc(): msg=WM_NCHITTEST
Hdr. proc(): msg=WM_SETCURSOR
Hdr. proc(): msg=WM_MOUSEMOVE
Hdr. proc(): msg=WM_NCHITTEST
Hdr. proc(): msg=WM_SETCURSOR
Hdr. proc(): msg=WM_MOUSEMOVE
Hdr. proc(): msg=WM_NCHITTEST
Hdr. proc(): msg=WM_SETCURSOR
Hdr. proc(): msg=WM_MOUSEMOVE
Hdr. proc(): msg=WM_NCHITTEST
Hdr. proc(): msg=WM_SETCURSOR
Hdr. proc(): msg=WM_NCMOUSEMOVE
There's a different set of "unknown" messages at the top there.