Is there a way to display a graphical up or down arrow in a ListView column heading to indicate which way the column is sorted? Or can I color the pixels within the ListView column heading another color? So, if I have a column of width 125 (lvc.cx = 125) and lvc.pszText = "Type", I would like to have an arrow to the right of "Type" to indicate which way the column is sorted. If I could change pixel colors within the column header, I think that would get me there.
Looking at the Unicode table, there are numerous arrows. That works great, but any unicode symbol > 4 doesn't work. My compiler says 'too large of a number'. But, I found one that will work. However, I can't put it where I want to. It would be nice to be able to color pixels within the ListView column header so I could move it over slightly.
It might help if you could post
- which version of ListView, because pretty much every GUI out there has their own version. Even M$ has several depending on whether you're using regular Win32 or .NET.
- what compiler you're using
- some actual code snippets which show the error.
- some actual error messages (not paraphrased).
TextOutW(hdc,200,280,L"\x1F815",1); // up arrow gives Error code C2188 "too big for wide character"
TextOutW(hdc,200,280,L"\U0001F815",2); // compiles but doesn't print correctly
TextOutW(hdc,200,280,L"\x25B2",1); // this up arrow works great
W (and L) in windows is for 'Wide-char' which in windows-speak is of underlying type wchar_t which is 16 bits. Hence the warning re x1F815 as it's greater than 0xFFFF. Also, that's why x25B2 works - as it's smaller than 0xFFFF.
MFC / basic windows only supports 16 bit unicode (UTF16)
I don't know if there is an add-on library or if managed libraries support 32 or not; I have not needed it.
You should be able to over-ride the font size somewhere.
if that does not work like you want, you can owner-draw the frame yourself and do whatever you like.