|
-
May 19th, 1999, 09:47 AM
#1
Right aligning first column in CListCtrl
How do I make the first (i.e. leftmost) column right-align the text in it? This would be useful for a list of numbers. According to the help, CListCtrl's first column must be left-aligned. Any ideas?
-
May 19th, 1999, 06:19 PM
#2
Re: Right aligning first column in CListCtrl
The solution is to set the column again after it has been inserted.
LV_COLUMN lvColumn;
memset(&lvColumn, 0, sizeof(lvColumn));
lvColumn.mask = LVCF_FMT;
m_MyListCtrl.GetColumn(0, &lvColumn);
if((m_gListColumn[0].fmt & LVCFMT_RIGHT) == LVCFMT_RIGHT)
lvColumn.fmt |= LVCFMT_RIGHT;
else if(m_gListColumn[0].fmt & LVCFMT_CENTER) == LVCFMT_CENTER)
lvColumn.fmt |= LVCFMT_CENTER;
m_MyListCtrl.SetColumn(0, &lvColumn);
-
May 20th, 1999, 03:28 AM
#3
Re: Right aligning first column in CListCtrl
Thank you very much. Works wonderfully.
:-)
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
|