|
I want to set the alignment of the items only and not for the header.
I tried with SetColumn with LVCFMT_RIGHT
but that aligns header also. I just want to align only the items(header should be skipped)
I also thought that SetItem should work for aligning only a single item but I don't know how it can be used for aligning a single item.
|
|
|
|
|
According to the documentation[^] alignment affects both header and content. The only way I can think to work round this would be to make it owner drawn and catch the WM_DRAWITEM message[^] to draw the items yourself.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
|
That first link looks like it is the answer to your question, give it a try and then modify to your specific requirements.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Thanks a lot. That worked. It aligned the text as I expected but few items could not be drawn, I guess I have to skip where the item type is image instead of text. Or may be I have to set the image also. I am working on it. I had used lvs_ownerdrawfixed.
Thanks,
Rahul Kulshreshtha
|
|
|
|
|
In general the items in a list control consist of a text description and an image. If you use images then you would normally have one for every item. Take a look at Windows explorer and switch between the various views to see how the 'standard' displays are laid out.
One of these days I'm going to think of a really clever signature.
|
|
|
|