How can we increase the the height and width of a cell in List
It is created using Listcontrol MFC
How can we increase the the height and width of a cell in List
It is created using Listcontrol MFC
MeasureItem( LPMEASUREITEMSTRUCT
lpMeasureItemStruct )
To set the cell width take a look at the *ListView_SetColumnWidth* Win32 function.
One way to set the height is to attach an image list to the list control. The list control will then set the row height based on the height of the icons in the image list.
An easy way to set the cell height of a list control is by supplying an image list of the required height:
In the header:
CImageList m_imageList;
In the implementation:
m_imageList.Create(68, 68, ILC_COLOR4, 10, 10); // 68 = cell height in pixels
m_list.SetImageList(&m_imageList, LVSIL_SMALL);
Setting the cell width is achieved by simply calling SetColumnWidth
(as pointed out by jussij)