Jeffrey, Thanks for your reply.
With regard to not using HDF_BITMAP or HDF_IMAGE - As the document you
referenced suggests, without supplying an HDF_IMAGE or HDF_BITMAP, we should
be able to set HDF_SORTUP or HDF_SORTDOWN and have the control draw a small
sort direction arrow. The nice thing about this is that hopefully the arrow
is drawn just to the right of the header column text. This does not seem to
work.
With regard to trying to using the list control's image list and setting
HDF_BITMAP_ON_RIGHT - As you probably have seen, when we do use the list
control's image list to provide our own sort arrow bitmaps, there is no way
to apply the old HDF_BITMAP_ON_RIGHT style. As soon as I use SendMessage to
set it, the list control takes it away.
With regard to setting the header image list manually - What's more, when I
use the technique suggested in the KB 314933 article, as soon as I set the
header image list, the list control resets that (takes it away) too.
> Hi ricccle65,
>
[quoted text clipped - 16 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Jeffrey Tan[MSFT]" - 09 May 2006 04:55 GMT
Hi ricccle65,
Thanks for your feedback.
I do not think I understand your reply completely.
1. I have tested this scenario in VS2005, and I can assign an ImageList
item to the header control of ListView
2. I think when we are displaying an image on the header control, it should
have HDF_BITMAP flag on, so we should not use HDF_SORTUP or HDF_SORTDOWN.
Can you be a little clear regarding your problem? Thanks
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
ricd - 09 May 2006 14:43 GMT
Sorry for taking so long to be clear about this. I am suspecting that with
the current structure that wraps the header control so completely within the
ListView, drawing sorting arrows is a completely manual operation (via owner
draw).
Here is the clarification you asked for: I need to display sort arrows to
the right of the header column text in a ListView in Details mode (the 'to
the right' is the important part). I do not need a bitmap for any other
purpose. I have implemented a test where I am assigning an ImageList
containing up and down arrow bitmaps to the ListView and this does not work
as desired. When the ImageList is used to display the arrow, the arrow
always appears to the left of the column header text. I need it to appear on
the right of the text.
I noticed that you said you assigned an ImageList to the header control of
a ListView. In .NET 2.0, I can only seem to assign an ImageList to the
parent ListView (in .NET 2.0, the header column ImageIndex is an index into
the ListView's ImageList). Whenever I try to assign an ImageList directly to
the header control, using the technique described in KB 314933, the parent
ListView immediately removes it.
> Hi ricccle65,
>
[quoted text clipped - 17 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Jeffrey Tan[MSFT]" - 11 May 2006 08:08 GMT
Hi ricccle65,
Thanks for your feedback!
Oh, yes. It seems that this is a known issue of ListView control. .Net
winform ListView control does not implement HDF_SORTUP/HDF_SORTDOWN
function. Please refer to the link below:
"Bug Details: ColumnHeader class contains an incomplete implementation of
the class in comctl32"
http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=4
1773165-e7f0-47c0-aa06-8f5675684be1
Hope this helps
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.