I believe that the visually right thing is to align grid line to darkest line of header separator.
Unfortunatly, information provided by theming api is rather limited.... The only possible solution is to add more heurestics and simply detect that "darkest line"... (which will fail for "inverse" themes). OTOH, current ChWin32.cpp is already full of such visual heurestics (most of them deal with combobox button , so maybe I could solve that... simply enforce that headertab ends with the darkest line.
As for "left" header, there is no support in theming API nor in chameleon YET. Possible solution (which might be provided by ch in future) is to draw to Image and rotate pixels. (ChPaintRotatedClockwise...)