Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am working on on to save the column width of a list control,but in my list control we used as virtual list control so am not able to update the column width.

can we have any other option to increase or decrease the column width of virtual list control.
Posted

1 solution

Take a look: VC++ MFC Tutorial: CListCtrl, InsertItem, Using List Control, SetImageList, Article with source code[^]

>can we have any other option to increase or decrease the column width of virtual list control.

Yes, we can:

C++
// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;

// Double the column width of the first column.
int nWidth = pmyListCtrl->GetColumnWidth(0);
pmyListCtrl->SetColumnWidth(0, 2*nWidth);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900