CListCtrl m_lst; 數組
//關於列順序調整 spa
CHeaderCtrl* pHeaderCtrl = m_lst.GetHeaderCtrl();
if (pHeaderCtrl != NULL)
{
int nColumnCount = pHeaderCtrl->GetItemCount();
LPINT pnOrder = (LPINT) malloc(nColumnCount*sizeof(int));
ASSERT(pnOrder != NULL);
//得到列順序到數組
m_lst.GetColumnOrderArray(pnOrder, nColumnCount);
int temp ;
for (int i = 0; i<=nColumnCount-1; i++)
{
temp = pnOrder[i];
pnOrder[i] = pnOrder[nColumnCount-1];
pnOrder[nColumnCount-1] =temp;
} List
//設置列順序
m_lst.SetColumnOrderArray(nColumnCount, pnOrder);
free(pnOrder); }