////////////////////////////
void SSS::SetCell(HWND hWnd1, CString value, int nRow, int nCol)
{
TCHAR szString [256];
wsprintf(szString,value ,0);
//Fill the LVITEM structure with the values given as parameters.
LVITEM lvItem;
lvItem.mask = LVIF_TEXT;
lvItem.iItem = nRow;
lvItem.pszText = szString;
lvItem.iSubItem = nCol;
if(nCol >0)
//set the value of listItem
::SendMessage(hWnd1,LVM_SETITEM, (WPARAM)0,(WPARAM)&lvItem);
else
//Insert the value into List
ListView_InsertItem(hWnd1,&lvItem);
}
SetCell(::GetDlgItem (m_hWnd,IDC_LIST1),nr,pNMListView->iItem, pNMListView->iSubItem);//設置第Index行,第C_L列的值.