-
April 18th, 2012, 04:11 PM
#1
LVCFMT_CENTER doesn't work for first column in CListCtrl
I called InsertColumn to insert columns and use LVCFMT_CENTER to set the text to the center of the column. It works well for any columns except the first column. Is there any way to get around this issue? Thanks.
-
April 18th, 2012, 04:18 PM
#2
Re: LVCFMT_CENTER doesn't work for first column in CListCtrl
Yes, it is by design. See the Remarks section in LVCOLUMN structure article.
PS: it is always very useful to read the documentation first...
Last edited by VictorN; April 19th, 2012 at 12:51 AM.
Victor Nijegorodov
-
April 18th, 2012, 04:30 PM
#3
Re: LVCFMT_CENTER doesn't work for first column in CListCtrl
Originally Posted by VictorN
That 'Remarks' section looks less like an explanation that this is by design, and more like a workaround for a bug.
-
April 18th, 2012, 04:34 PM
#4
-
April 18th, 2012, 05:24 PM
#5
Re: LVCFMT_CENTER doesn't work for first column in CListCtrl
Thanks. It works.
Originally Posted by VictorN
Yes, it is by design. See the Rearks section in LVCOLUMN structure article.
PS: it is always very useful to read the documentation first...
-
April 18th, 2012, 05:28 PM
#6
Re: LVCFMT_CENTER doesn't work for first column in CListCtrl
Originally Posted by Peter_B
That 'Remarks' section looks less like an explanation that this is by design, and more like a workaround for a bug.
Either way it's documented. Had Larry bothered to read the documentation instead of posting here, he would have found the answer, he would have found it quicker, and Victor wouldn't have had to do his work for him.
Seriously Larry, after 7 years here, you should be able to find this stuff yourself.
-
April 18th, 2012, 05:42 PM
#7
Re: LVCFMT_CENTER doesn't work for first column in CListCtrl
Originally Posted by GCDEF
Either way it's documented.
Oh, I absolutely agree. In fact, the remarks sections are extremely important to read as they are where the unusual/unexpected behaviour tends to be documented.
My point was really that this remarks section seems to indicate that this behaviour wasn't originally explicitly designed, but was later documented to avoid having to fix a bug (which could cause existing code to break).
-
April 18th, 2012, 05:55 PM
#8
Re: LVCFMT_CENTER doesn't work for first column in CListCtrl
Originally Posted by Peter_B
Oh, I absolutely agree. In fact, the remarks sections are extremely important to read as they are where the unusual/unexpected behaviour tends to be documented.
My point was really that this remarks section seems to indicate that this behaviour wasn't originally explicitly designed, but was later documented to avoid having to fix a bug (which could cause existing code to break).
I know. My point was mainly directed to Larry and others that use this site instead of using the documentation. This guy's started 231 threads. Not really my concern I guess but that seems a bit high.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|