How do you CENTER & BOLD the labels of the columns (i.e headings) using ListView. I did not understand the below found in MSDN.. /* If a column is added to a list-view control with index 0 (the leftmost column) and with LVCFMT_RIGHT or LVCFMT_CENTER specified, the text is not right-aligned or centered. The text in the index 0 column is left-aligned. Therefore if you keep inserting columns with index 0, the text in all columns are left-aligned. If you want the first column to be right-aligned or centered you can make a dummy column, then insert one or more columns with index 1 or higher and specify the alignment you require. Finally delete the dummy column. */ Also I want the last column to occupy the remaining width of the window even if resizing of the Main Window takes place.
When you use the syntax for InsertColumn in a list view you have to specify the index at which that column is inserted. If you specify that as zero the Text align is Left by default and so you cannot Make it right or centered align. To make the left column left align inserting a dummy column with index zero and then at index 1 and then delete the column at index 0 provides us what we want. I hope this clears what you cannot understand from MSDN That can be done by specifying the column width same as the size of the listview. Thanks Shabbir Bhimani
You have posted in the wrong forums. It should be in MFC/Win32 under Queries and expert comments and not under Codes and projects Section