示例#1
0
void CCJListCtrl::SetColumnWidth(int nCol)
{
	int iWidth = GetRegColumnWidth( nCol );
	if( iWidth < MINCOLWIDTH )
		AutoSizeColumn( nCol );
	else
		CListCtrl::SetColumnWidth( nCol, iWidth );
}
/*
Utility function to set the width on the column based on the registry
value and a set minimum column width.
*/
void CMultiColumnSortListCtrl::SetColumnWidth( int nCol )
{
	int iWidth = GetRegColumnWidth( nCol );
	if( iWidth > -1 )
	{
		if( iWidth < MINCOLWIDTH )
		{
			AutoSizeColumn( nCol );
		}
		else
		{
			CListCtrl::SetColumnWidth( nCol, iWidth );
		}
	}
}