本文整理汇总了C++中INDEXTOSTATEIMAGEMASK函数的典型用法代码示例。如果您正苦于以下问题:C++ INDEXTOSTATEIMAGEMASK函数的具体用法?C++ INDEXTOSTATEIMAGEMASK怎么用?C++ INDEXTOSTATEIMAGEMASK使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了INDEXTOSTATEIMAGEMASK函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TreeList_Update
void TreeList_Update(HWND hwnd)
{
TTreeList_Data *data = (TTreeList_Data *)sttTreeList_GeWindowData(hwnd);
HTREELISTITEM hItem = data->root;
int sortIndex = 0;
SendMessage(hwnd, WM_SETREDRAW, FALSE, 0);
if (data->sortMode)
TreeList_RecursiveApply(hItem, sttTreeList_SortItems, (LPARAM)data->sortMode);
TreeList_RecursiveApply(hItem, sttTreeList_ResetIndex, (LPARAM)&sortIndex);
if (data->filter)
TreeList_RecursiveApply(hItem, sttTreeList_FilterItems, (LPARAM)data->filter);
for (int i = ListView_GetItemCount(hwnd); i--;) {
LVITEM lvi = {0};
lvi.mask = LVIF_PARAM;
lvi.iItem = i;
lvi.iSubItem = 0;
ListView_GetItem(hwnd, &lvi);
HTREELISTITEM ptli = (HTREELISTITEM)lvi.lParam;
if ((ptli->flags & TLIF_VISIBLE) && (!data->filter || (ptli->flags & TLIF_FILTERED))) {
ptli->flags |= TLIF_HASITEM;
if (ptli->flags & TLIF_MODIFIED) {
lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE | LVIF_TEXT;
lvi.iItem = i;
lvi.iSubItem = 0;
lvi.pszText = ptli->text[0];
lvi.stateMask = LVIS_OVERLAYMASK|LVIS_STATEIMAGEMASK;
lvi.iImage = ptli->iIcon;
if (data->mode == TLM_TREE)
lvi.state =
INDEXTOSTATEIMAGEMASK(
((ptli->subItems.getCount() == 0) && !(ptli->flags & TLIF_FAKEPARENT)) ? 0 :
(ptli->flags & TLIF_EXPANDED) ? 1 : 2) |
INDEXTOOVERLAYMASK(ptli->iOverlay);
else
lvi.state =
INDEXTOSTATEIMAGEMASK(
((ptli->subItems.getCount() == 0) && !(ptli->flags & TLIF_FAKEPARENT)) ? 0 : 3) |
INDEXTOOVERLAYMASK(ptli->iOverlay);
ListView_SetItem(hwnd, &lvi);
for (int j = 1; j < ptli->text.getCount(); ++j)
ListView_SetItemText(hwnd, i, j, ptli->text[j]);
}
}
else ListView_DeleteItem(hwnd, i);
}
if (data->mode == TLM_TREE)
TreeList_RecursiveApply(hItem, sttTreeList_CreateItems, (LPARAM)hwnd);
else {
for (int i = data->hItemSelected->subItems.getCount(); i--;)
sttTreeList_CreateItems_List(data->hItemSelected->subItems[i], (LPARAM)hwnd);
for (HTREELISTITEM hItem = data->hItemSelected; !(hItem->flags & TLIF_ROOT); hItem = hItem->parent)
sttTreeList_CreateItems_List(hItem, (LPARAM)hwnd);
}
ListView_SortItems(hwnd, sttTreeList_SortFunc, 0);
SendMessage(hwnd, WM_SETREDRAW, TRUE, 0);
UpdateWindow(hwnd);
}
示例2: switch
void CComplexSymbolLayerCtrl::AddItem(int nIndex, int nState)
{
LV_ITEM lvi;
lvi.mask = LVIF_IMAGE|LVIF_STATE;
lvi.iItem = nIndex;
lvi.iSubItem = 0;
lvi.iImage = nIndex;
lvi.pszText = "";
lvi.stateMask = LVIS_STATEIMAGEMASK|LVIS_DROPHILITED;
switch(nState)
{
case 1:
lvi.state = INDEXTOSTATEIMAGEMASK( 1 );
break;
case 2:
lvi.state =INDEXTOSTATEIMAGEMASK( 2 );
break;
case 3:
lvi.state = INDEXTOSTATEIMAGEMASK( 3 )|LVIS_DROPHILITED ;
break;
case 4:
lvi.state = INDEXTOSTATEIMAGEMASK( 4 )|LVIS_DROPHILITED;
break;
}
InsertItem( &lvi );
}
示例3: INDEXTOSTATEIMAGEMASK
void CIVRuleDlg::OnRuleUse()
{
if ( CIVRuleCfgDoc::IsUse(m_nCurrentChan) )
{
CIVRuleCfgDoc::Use(m_nCurrentChan,false);
m_CameraTree.SetItemState(
m_ClickItem,
INDEXTOSTATEIMAGEMASK(1),
TVIS_STATEIMAGEMASK );
}
else
{
if ( g_IIVDeviceBase2->IsHaveFreeDevice() )
{
CIVRuleCfgDoc::Use(m_nCurrentChan,true);
m_CameraTree.SetItemState(
m_ClickItem,
INDEXTOSTATEIMAGEMASK(2),
TVIS_STATEIMAGEMASK );
}
else
{
MessageBox(
_T("Is not enought IV Channel, You Must Stop Other IV Channel First!"));
}
}
}
示例4: onItemChanged
// Clicked 'Active' check box
LRESULT ADLSearchFrame::onItemChanged(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/)
{
NM_LISTVIEW* lv = (NM_LISTVIEW*) pnmh;
::EnableWindow(GetDlgItem(IDC_EDIT), (lv->uNewState & LVIS_FOCUSED));
::EnableWindow(GetDlgItem(IDC_REMOVE), (lv->uNewState & LVIS_FOCUSED));
NMITEMACTIVATE* item = (NMITEMACTIVATE*)pnmh;
if((item->uChanged & LVIF_STATE) == 0)
return 0;
if((item->uOldState & INDEXTOSTATEIMAGEMASK(0xf)) == 0)
return 0;
if((item->uNewState & INDEXTOSTATEIMAGEMASK(0xf)) == 0)
return 0;
if(item->iItem >= 0)
{
// Set new active status check box
/*ADLSearchManager::SearchCollection& collection = ADLSearchManager::getInstance()->collection;
ADLSearch* search = collection[item->iItem];
search->isActive = (ctrlList.GetCheckState(item->iItem) != 0);*/
ADLSearchManager::getInstance()->changeState(item->iItem, ctrlList.GetCheckState(item->iItem) != 0);
}
return 0;
}
示例5: GetListCtrl
void CRowListView::CheckItem(int nNewCheckedItem)
{
CListCtrl& ListCtrl = GetListCtrl();
// reset if there is checked item
if (m_nCheckedItem != -1)
{
if (m_bStateIcons)
{
ListCtrl.SetItemState(m_nCheckedItem,
INDEXTOSTATEIMAGEMASK(1), LVIS_STATEIMAGEMASK);
}
else
{
ListCtrl.SetItemState(m_nCheckedItem,
INDEXTOSTATEIMAGEMASK(1),
LVIS_STATEIMAGEMASK | LVIS_OVERLAYMASK);
}
::DestroyIcon(m_hSmallIcon);
::DestroyIcon(m_hLargeIcon);
}
// check new item and set its icon as the app icon
CWnd* pMainWnd = AfxGetMainWnd();
if (m_nCheckedItem == nNewCheckedItem)
{
m_nCheckedItem = -1;
pMainWnd->SetIcon(NULL, FALSE);
pMainWnd->SetIcon(NULL, TRUE);
}
else if ((m_nCheckedItem = nNewCheckedItem) != -1)
{
if (m_bStateIcons)
{
ListCtrl.SetItemState(m_nCheckedItem,
INDEXTOSTATEIMAGEMASK(2), LVIS_STATEIMAGEMASK);
}
else
{
ListCtrl.SetItemState(m_nCheckedItem,
INDEXTOSTATEIMAGEMASK(2) | INDEXTOOVERLAYMASK(1),
LVIS_STATEIMAGEMASK | LVIS_OVERLAYMASK);
}
m_hSmallIcon =
ListCtrl.GetImageList(LVSIL_SMALL)->ExtractIcon(nNewCheckedItem);
pMainWnd->SetIcon(m_hSmallIcon,FALSE);
m_hLargeIcon =
ListCtrl.GetImageList(LVSIL_NORMAL)->ExtractIcon(nNewCheckedItem);
pMainWnd->SetIcon(m_hLargeIcon,TRUE);
}
}
示例6: GetParent
void KUIMulStatusTree::TravelChild(HTREEITEM hItem, int nCheck)
{
HTREEITEM hChildItem = NULL;
HTREEITEM hBrotherItem = NULL;;
HWND hParent = GetParent();
UINT nState = 0;
//查找子节点,没有就结束
hChildItem = GetChildItem(hItem);
int nChildCheck = nCheck;
GetCheck(hChildItem,nChildCheck);
if(hChildItem != NULL && nChildCheck != KUIMulStatusTree::EM_TVIS_NONE)
{
//设置子节点的状态与当前节点的状态一致
nState = GetItemState(hChildItem, TVIS_STATEIMAGEMASK);
if (nState != INDEXTOSTATEIMAGEMASK(nCheck))
{
SetItemState(hChildItem, INDEXTOSTATEIMAGEMASK(nCheck), TVIS_STATEIMAGEMASK);
// if (hParent != NULL)
// {
// ::SendMessage(hParent, WM_KAN_NOTIFY_TREE_CHECKED_CHANGE, (WPARAM)hChildItem, (LPARAM)nCheck);
// }
}
//再递归处理子节点的子节点和兄弟节点
TravelChild(hChildItem, nCheck);
//处理子节点的兄弟节点和其子节点
hBrotherItem = GetNextSiblingItem(hChildItem);
while (hBrotherItem)
{
//设置子节点的兄弟节点状态与当前节点的状态一致
nState = GetItemState(hBrotherItem, TVIS_STATEIMAGEMASK);
int nBrotherCheck = nCheck;
GetCheck(hBrotherItem,nBrotherCheck);
if (nState != INDEXTOSTATEIMAGEMASK(nCheck) && nBrotherCheck != KUIMulStatusTree::EM_TVIS_NONE)
{
SetItemState(hBrotherItem, INDEXTOSTATEIMAGEMASK(nCheck), TVIS_STATEIMAGEMASK);
// if (hParent != NULL)
// {
// ::SendMessage(hParent, WM_KAN_NOTIFY_TREE_CHECKED_CHANGE, (WPARAM)hBrotherItem, (LPARAM)nCheck);
// }
}
//再递归处理子节点的兄弟节点的子节点和兄弟节点
TravelChild(hBrotherItem, nCheck);
hBrotherItem = GetNextSiblingItem(hBrotherItem);
}
}
}
示例7: switch
void CTracksSerializerDlg::OnLvnGetdispinfoTracklist(NMHDR *pNMHDR, LRESULT *pResult)
{
NMLVDISPINFO *pDispInfo = reinterpret_cast<NMLVDISPINFO*>(pNMHDR);
//Create a pointer to the item
LV_ITEM* pItem= &(pDispInfo->item);
//Which item number?
int itemid = pItem->iItem;
TCHAR bf[20];
//Do the list need text information?
if (pItem->mask & LVIF_TEXT)
{
LPCTSTR str = NULL;
switch (pItem->iSubItem)
{
case 0: str = m_ItemsURL[itemid].c_str(); break;
case 1: str = m_ItemsTagInfo[itemid].Title.c_str(); break;
case 2: str = m_ItemsTagInfo[itemid].Artist.c_str(); break;
case 3: str = m_ItemsTagInfo[itemid].Album.c_str(); break;
case 4:
PrgAPI::FormatDuration(bf, 20, m_ItemsTagInfo[itemid].Length);
str = bf;
break;
case 5: str = m_ItemsTagInfo[itemid].Genre.c_str(); break;
}
//Copy the text to the LV_ITEM structure
//Maximum number of characters is in pItem->cchTextMax
lstrcpyn(pItem->pszText, str, pItem->cchTextMax);
}
//Do the list need image information?
if( pItem->mask & LVIF_IMAGE)
{
pItem->mask |= LVIF_STATE;
pItem->stateMask = LVIS_STATEIMAGEMASK;
if(m_ItemsChecked[itemid])
{
//Turn check box on
pItem->state = INDEXTOSTATEIMAGEMASK(2);
}
else
{
//Turn check box off
pItem->state = INDEXTOSTATEIMAGEMASK(1);
}
}
*pResult = 0;
}
示例8: StartTimer
void CWallChangerDlg::OnLvnItemchangedListClass(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
if (!pNMLV)
return;
if (m_bInit && (pNMLV->uOldState==INDEXTOSTATEIMAGEMASK(1)) && (pNMLV->uNewState==INDEXTOSTATEIMAGEMASK(2))) {
// Check this Item
bool bEmptyEnable = (::g_pWallEnablePicList->GetCount() == 0);
m_listClass.SetItemEnable(pNMLV->iItem, true);
if (bEmptyEnable && ::g_pWallEnablePicList->GetCount())
StartTimer();
m_listClass.SetIniModify();
} else if (m_bInit && (pNMLV->uOldState==INDEXTOSTATEIMAGEMASK(2)) && (pNMLV->uNewState==INDEXTOSTATEIMAGEMASK(1))) {
// UnCheck this Item
m_listClass.SetItemEnable(pNMLV->iItem, false);
if (::g_pWallEnablePicList->GetCount() == 0)
StopTimer();
m_listClass.SetIniModify();
} else {
// Change Select Items
int iSelCount = m_listClass.GetSelectedCount();
if (iSelCount == 1) {
if (m_pCurListDirPath)
m_pCurListDirPath->ShowWindow(SW_HIDE);
else
m_listDirPath.ShowWindow(SW_HIDE);
CWallClassListItem *pListItem = (CWallClassListItem *)m_listClass.GetFirstSelectedItemLParam();
if (pListItem)
m_pCurListDirPath = (CWallDirListCtrl *)pListItem->GetChildDirList();
if (m_pCurListDirPath) {
CRect rcDirList;
m_listDirPath.GetWindowRect(rcDirList);
ScreenToClient(rcDirList);
m_pCurListDirPath->MoveWindow(rcDirList);
m_pCurListDirPath->ShowWindow(SW_SHOW);
}
} else {
if (m_pCurListDirPath) {
m_pCurListDirPath->ShowWindow(SW_HIDE);
m_pCurListDirPath = NULL;
}
m_listDirPath.ShowWindow(SW_SHOW);
}
}
*pResult = 0;
}
示例9: PopulateProtocolList
void PopulateProtocolList(HWND hWnd)
{
bool useOne = IsDlgButtonChecked(hWnd, IDC_USEBYPROTOCOL) == BST_UNCHECKED;
HWND hLstView = GetDlgItem(hWnd, IDC_PROTOLIST);
TreeView_DeleteAllItems(hLstView);
TVINSERTSTRUCT tvi = {0};
tvi.hParent = TVI_ROOT;
tvi.hInsertAfter = TVI_LAST;
tvi.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_STATE | TVIF_SELECTEDIMAGE;
tvi.item.stateMask = TVIS_STATEIMAGEMASK;
NudgeElementList *n;
int i = 0;
if (GlobalNudge.useByProtocol)
{
#ifdef _UNICODE
wchar_t buff[256];
#endif
for(n = NudgeList;n != NULL; n = n->next)
{
#ifdef _UNICODE
MultiByteToWideChar(CP_ACP, 0, n->item.ProtocolName, -1, buff, 256);
tvi.item.pszText = buff;
#else
tvi.item.pszText = n->item.ProtocolName;
#endif
tvi.item.iImage = i;
n->item.iProtoNumber = i;
tvi.item.iSelectedImage = i;
tvi.item.state = INDEXTOSTATEIMAGEMASK(n->item.enabled?2:1);
TreeView_InsertItem(hLstView, &tvi);
i++;
}
}
else
{
tvi.item.pszText = TranslateT("Nudge");
tvi.item.iImage = nProtocol;
DefaultNudge.iProtoNumber = nProtocol;
tvi.item.iSelectedImage = nProtocol;
tvi.item.state = INDEXTOSTATEIMAGEMASK(DefaultNudge.enabled?2:1);
TreeView_InsertItem(hLstView, &tvi);
}
TreeView_SelectItem(hLstView, TreeView_GetRoot(hLstView));
//TreeView_SetCheckState(hLstView, TreeView_GetRoot(hLstView), TRUE)
}
示例10: switch
void CHistoryBar::OnGetdispinfoList(NMHDR* pNMHDR, LRESULT* pResult)
{
NMLVDISPINFO* pDispInfo = (NMLVDISPINFO*)pNMHDR;
LVITEM& item = pDispInfo->item;
CUndoManager *UndoMgr = theApp.GetMain()->GetUndoManager();
if (UndoMgr == NULL) // if no documents
return;
*pResult = 0;
if (item.mask & LVIF_TEXT) {
switch (item.iSubItem) {
case COL_ACTION:
{
CString s;
if (item.iItem) {
CWaveShopView *View = theApp.GetMain()->GetView();
// items are offset by one to make room for initial state
s = View->GetUndoTitle(UndoMgr->GetState(item.iItem - 1));
} else // item zero is initial state
s.LoadString(IDS_HIST_INITIAL_STATE);
_tcsncpy(item.pszText, s, item.cchTextMax);
}
break;
}
}
if (item.mask & LVIF_IMAGE) {
switch (item.iSubItem) {
case COL_ACTION:
item.mask |= LVIF_STATE;
item.state = INDEXTOSTATEIMAGEMASK(item.iItem == UndoMgr->GetPos());
item.stateMask = LVIS_STATEIMAGEMASK;
break;
}
}
}
示例11: INDEXTOSTATEIMAGEMASK
void MainWindowPageScripts::ScriptToList(const uint8_t &ui8ScriptId, const bool &bInsert, const bool &bSelected) {
bIgnoreItemChanged = true;
LVITEM lvItem = { 0 };
lvItem.mask = LVIF_PARAM | LVIF_TEXT;
lvItem.iItem = ui8ScriptId;
lvItem.pszText = ScriptManager->ScriptTable[ui8ScriptId]->sName;
lvItem.lParam = (LPARAM)ScriptManager->ScriptTable[ui8ScriptId];
if(bSelected == true) {
lvItem.mask |= LVIF_STATE;
lvItem.state = LVIS_SELECTED;
lvItem.stateMask = LVIS_SELECTED;
}
int i = -1;
if(bInsert == true) {
i = (int)::SendMessage(hWndPageItems[LV_SCRIPTS], LVM_INSERTITEM, 0, (LPARAM)&lvItem);
} else {
i = (int)::SendMessage(hWndPageItems[LV_SCRIPTS], LVM_SETITEM, 0, (LPARAM)&lvItem);
}
if(i != -1 || bInsert == false) {
lvItem.mask = LVIF_STATE;
lvItem.state = INDEXTOSTATEIMAGEMASK(ScriptManager->ScriptTable[ui8ScriptId]->bEnabled == true ? 2 : 1);
lvItem.stateMask = LVIS_STATEIMAGEMASK;
::SendMessage(hWndPageItems[LV_SCRIPTS], LVM_SETITEMSTATE, ui8ScriptId, (LPARAM)&lvItem);
}
bIgnoreItemChanged = false;
}
示例12: Tree_AddExtraIconGroup
HTREEITEM Tree_AddExtraIconGroup(intlist &group, bool selected, HTREEITEM hAfter = TVI_LAST)
{
intlist *ids = new intlist();
CMString desc;
int img = 0;
for (int i = 0; i < group.count; i++) {
BaseExtraIcon *extra = registeredExtraIcons[group.data[i] - 1];
ids->add(extra->getID());
if (img == 0 && !IsEmpty(extra->getDescIcon()))
img = extra->getID();
if (i > 0)
desc += _T(" / ");
desc += extra->getDescription();
}
TVINSERTSTRUCT tvis = { 0 };
tvis.hInsertAfter = hAfter;
tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE;
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
tvis.item.iSelectedImage = tvis.item.iImage = img;
tvis.item.lParam = (LPARAM)ids;
tvis.item.pszText = (TCHAR*)desc.c_str();
tvis.item.state = INDEXTOSTATEIMAGEMASK(selected ? 2 : 1);
return m_tree.InsertItem(&tvis);
}
示例13: ATLASSERT
BOOL KUIMulStatusTree::SetCheck(
HTREEITEM hItem,
int nCheck,
BOOL bUpdate /* = TRUE */)
{
ATLASSERT(hItem != NULL);
ATLASSERT(m_hWnd != NULL);
TV_ITEM tvi;
ZeroMemory(&tvi, sizeof(tvi));
tvi.hItem = hItem;
tvi.mask = TVIF_STATE;
tvi.stateMask = TVIS_STATEIMAGEMASK;
ATLASSERT((nCheck >= EM_TVIS_NONE) && (nCheck <= EM_TVIS_CHECK));
tvi.state = INDEXTOSTATEIMAGEMASK(nCheck);
if (!TreeView_SetItem(m_hWnd, &tvi))
return FALSE;
if (nCheck != EM_TVIS_NONE)
{
if (bUpdate)
TravelChild(hItem, nCheck);
TravelSiblingAndParent(hItem, nCheck);
} // if (nCheck != EM_TVIS_NONE)
return TRUE;
}
示例14: INDEXTOSTATEIMAGEMASK
void Settings::DlgInsertTeam(HWND hwnd, const std::string& team, const std::string& section) {
if (dialog_data_.teams_.find(team) != dialog_data_.teams_.end())
return;
if (dialog_data_.sections_.find(section) == dialog_data_.sections_.end()) {
TVINSERTSTRUCTA tvi;
tvi.hParent = 0;
tvi.hInsertAfter = TVI_LAST;
tvi.itemex.mask = TVIF_TEXT;
tvi.itemex.pszText = const_cast<char*>(section.c_str());
dialog_data_.sections_[section] = (HTREEITEM)SendMessageA((hwnd), TVM_INSERTITEMA, 0, (LPARAM)&tvi);
}
HTREEITEM parent = dialog_data_.sections_[section];
{
TVINSERTSTRUCTA tvi;
tvi.hParent = parent;
tvi.hInsertAfter = TVI_LAST;
tvi.itemex.mask = TVIF_TEXT | TVIF_STATE;
tvi.itemex.state = INDEXTOSTATEIMAGEMASK((IsTeamFavorite(team) ? 2 : 1));
tvi.itemex.stateMask = TVIS_STATEIMAGEMASK;
tvi.itemex.pszText = const_cast<char*>(team.c_str());
dialog_data_.teams_[team] = (HTREEITEM)SendMessageA((hwnd), TVM_INSERTITEMA, 0, (LPARAM)&tvi);
TreeView_Expand(hwnd, parent, TVE_EXPAND);
}
}
示例15: ASSERT_VALID
int CLiveItem::Add(CListCtrl* pCtrl, int nItem, int nColumns)
{
ASSERT_VALID( this );
ASSERT_VALID( pCtrl );
LV_ITEM pItem = {};
pItem.mask = LVIF_PARAM|LVIF_TEXT|LVIF_STATE;
pItem.iItem = nItem >= 0 ? nItem : pCtrl->GetItemCount();
if ( m_nImage[ 0 ] >= 0 )
{
pItem.mask |= LVIF_IMAGE;
pItem.iImage = m_nImage[ 0 ];
}
pItem.lParam = (LPARAM)m_nParam;
pItem.state = INDEXTOOVERLAYMASK( m_nMaskOverlay ) | INDEXTOSTATEIMAGEMASK( m_nMaskState );
pItem.stateMask = LVIS_OVERLAYMASK | LVIS_STATEIMAGEMASK;
pItem.pszText = (LPTSTR)(LPCTSTR)m_pColumn[0];
pItem.iItem = pCtrl->InsertItem( &pItem );
if ( pItem.iItem != -1 )
{
for ( pItem.iSubItem = 1 ; pItem.iSubItem < nColumns ; pItem.iSubItem++ )
{
pItem.mask = LVIF_TEXT;
pItem.pszText = (LPTSTR)(LPCTSTR)m_pColumn[ pItem.iSubItem ];
if ( m_nImage[ pItem.iSubItem ] >= 0 )
{
pItem.mask |= LVIF_IMAGE;
pItem.iImage = m_nImage[ pItem.iSubItem ];
}
VERIFY( pCtrl->SetItem( &pItem ) );
}
}
return pItem.iItem;
}