• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ListView_SetItemText函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ListView_SetItemText函数的典型用法代码示例。如果您正苦于以下问题:C++ ListView_SetItemText函数的具体用法?C++ ListView_SetItemText怎么用?C++ ListView_SetItemText使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ListView_SetItemText函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: InsertLogMsgParam

void InsertLogMsgParam(UINT nID, void *pParam, BYTE btFlags)
{
	TCHAR	szText[128];
	TCHAR	szMsg[256];

	int nCount = AddNewLogMsg();

	LoadString(g_hInst, nID, szText, sizeof(szText)/sizeof(TCHAR));
	
	switch (btFlags)
	{
		case LOGPARAM_STR:
			_stprintf(szMsg, szText, (LPTSTR)pParam);
			break;
		case LOGPARAM_INT:
			_stprintf(szMsg, szText, *(int *)pParam);
			break;
	}

	if (lstrlen(szMsg) <= 256)
	{
		ListView_SetItemText(g_hLogMsgWnd, nCount, 2, szMsg);
		ListView_Scroll(g_hLogMsgWnd, 0, 8);
	}
}
开发者ID:KaSt,项目名称:mir2ei,代码行数:25,代码来源:GameSvr.cpp


示例2: UpdateIPv6AddressField

void
UpdateIPv6AddressField(HWND hwndDlg, ULONG ulLabelId, TCHAR *szAddr)
{
	
    HWND	hListViewWnd = GetDlgItem(hwndDlg, IDC_IPV6_LISTBOX);
    int		iCount = 0;
	DWORD	dwID = 0;
	LVITEM	lvi = {0};
	int		i;
	BOOL	bFound = FALSE;

    TCHAR	szOldVal[INET6_ADDRSTRLEN];

	if (!bListViewInit)
	{
		InitListView(hwndDlg);
	}
	
	// Locate the line that contains the info to be updated
	for (i = 0; i < NUM_IPV6ITEMS; i++)
	{
		if (ulLabelId == ViewInfo[i].CtrlID)
		{
			// found the one we want to update
			ListView_GetItemText(hListViewWnd, ViewInfo[i].RowID, 1, szOldVal, INET6_ADDRSTRLEN);

			if (wcscmp(szOldVal, szAddr))
			{
				ListView_SetItemText(hListViewWnd, ViewInfo[i].RowID, 1, szAddr);
			}
			break;
        }
	}
}
开发者ID:NemProjects,项目名称:WLAN,代码行数:34,代码来源:ipquickcfgui.c


示例3: UpdateGroupProperties

static VOID
UpdateGroupProperties(HWND hwndDlg)
{
    TCHAR szGroupName[UNLEN];
    INT iItem;
    HWND hwndLV;
    PLOCALGROUP_INFO_1 pGroupInfo = NULL;

    hwndLV = GetDlgItem(hwndDlg, IDC_GROUPS_LIST);
    iItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED);
    if (iItem == -1)
        return;

    /* Get the group name */
    ListView_GetItemText(hwndLV,
                         iItem, 0,
                         szGroupName,
                         UNLEN);

    NetLocalGroupGetInfo(NULL, szGroupName, 1, (LPBYTE*)&pGroupInfo);

    ListView_SetItemText(hwndLV, iItem, 1,
                         pGroupInfo->lgrpi1_comment);

    NetApiBufferFree(pGroupInfo);
}
开发者ID:hoangduit,项目名称:reactos,代码行数:26,代码来源:groups.c


示例4: AddNewLogMsg

int AddNewLogMsg()
{
	LV_ITEM		lvi;
	TCHAR		szText[64];

	int nCount = ListView_GetItemCount(g_hLogMsgWnd);

	if (nCount >= 100)
	{
		ListView_DeleteItem(g_hLogMsgWnd, 0);
		nCount--;
	}

	lvi.mask		= LVIF_TEXT;
	lvi.iItem		= nCount;
	lvi.iSubItem	= 0;
	
	_tstrdate(szText);

	lvi.pszText = szText;
	
	ListView_InsertItem(g_hLogMsgWnd, &lvi);

	_tstrtime(szText);

	ListView_SetItemText(g_hLogMsgWnd, nCount, 1, szText);

	return nCount;
}
开发者ID:KaSt,项目名称:LegendOfMir3_Src,代码行数:29,代码来源:VirtualClient.cpp


示例5: ListView_GetItemCount

BOOL ZipDlg::ListAdd( Mp3File* pMp3, int intNum)
{
	intNum  = ( intNum < 0 ? ListView_GetItemCount( hwndList) : intNum) ;
	vector< Mp3File*>::iterator p = vecFileList.begin() + intNum ;

	// アイコン取得
	SHFILEINFO shfi ;
	SHGetFileInfo( pMp3->GetFilePath().c_str(), 0, &shfi, sizeof(SHFILEINFO),
			SHGFI_SYSICONINDEX | SHGFI_SMALLICON);

	// 表示文字列取得
	string filename = pMp3->GetSaveName();
	string fullpath = pMp3->GetFilePath();

	// アイテム設定
	LVITEM item = { LVIF_TEXT | LVIF_STATE | LVIF_PARAM | LVIF_IMAGE} ;
	intNum  = ( intNum < 0 ? ListView_GetItemCount( hwndList) : intNum) ;
	item.iItem		= intNum ;
	item.state		= LVIS_SELECTED ;
	item.lParam		= (LPARAM)pMp3 ;
	item.pszText		= (LPTSTR)filename.c_str() ;
	item.iSubItem		= 0 ;
	item.iImage		= shfi.iIcon ;
	ListView_InsertItem( hwndList, &item) ;
	ListView_SetItemText( hwndList, intNum, 1, (LPTSTR)fullpath.c_str()) ;

	// リロード
	ListReload() ;

	return TRUE ;
}
开发者ID:nitoyon,项目名称:mp3album,代码行数:31,代码来源:ZipDlg.cpp


示例6: InsertItem

//-----------------------------------------------------------------------------
void InsertItem(HWND _hwnd, char * _name, char * _value)
{
	LVITEM lvi;
	lvi.mask = LVIF_TEXT | LVIF_PARAM;
	lvi.pszText = "Should not be seen";


	lvi.iItem = 1;
	lvi.iSubItem = 0;
	lvi.lParam = (LPARAM) strdup(_name);

	int r = SendMessage(_hwnd, LVM_INSERTITEM, 0, (LPARAM)(const LV_ITEM FAR *)(&lvi));

	ListView_SetItemText(_hwnd, r, 0, _name);
	ListView_SetItemText(_hwnd, r, 1, _value);
}
开发者ID:OpenSourcedGames,项目名称:Arx-Fatalis,代码行数:17,代码来源:SCRIPT_DEBUGGER_Dialog.cpp


示例7: AddFullResourcesToList

static VOID AddFullResourcesToList(HWND hwnd)
{
    PCM_FULL_RESOURCE_DESCRIPTOR pFullDescriptor;
    TCHAR buffer[80];
    LVITEM item;
    ULONG i;
    INT iItem;

    for (i = 0; i < resourceValueData->Count; i++)
    {
        pFullDescriptor = &resourceValueData->List[i];

        wsprintf(buffer, _T("%lu"), pFullDescriptor->BusNumber);

        item.mask = LVIF_TEXT;
        item.iItem = i;
        item.iSubItem = 0;
        item.state = 0;
        item.stateMask = 0;
        item.pszText = buffer;
        item.cchTextMax = (int)_tcslen(item.pszText);

        iItem = ListView_InsertItem(hwnd, &item);
        if (iItem != -1)
        {
            GetInterfaceType(pFullDescriptor->InterfaceType, buffer, 80);
            ListView_SetItemText(hwnd, iItem, 1, buffer);
        }
    }
}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:30,代码来源:edit.c


示例8: lstrcpy

void VerticalFileSwitcherListView::setItemIconStatus(int bufferID)
{
	Buffer *buf = (Buffer *)bufferID;

	TCHAR fn[MAX_PATH];
	lstrcpy(fn, ::PathFindFileName(buf->getFileName()));
	::PathRemoveExtension(fn);

	LVITEM item;
	item.pszText = fn;
	item.iSubItem = 0;
	item.iImage = buf->getUserReadOnly()||buf->getFileReadOnly()?2:(buf->isDirty()?1:0);

	int nbItem = ListView_GetItemCount(_hSelf);

	for (int i = 0 ; i < nbItem ; i++)
	{
		item.mask = LVIF_PARAM;
		item.iItem = i;
		ListView_GetItem(_hSelf, &item);
		TaskLstFnStatus *tlfs = (TaskLstFnStatus *)(item.lParam);
		if (int(tlfs->_bufID) == bufferID)
		{
			item.mask = LVIF_TEXT | LVIF_IMAGE;
			ListView_SetItem(_hSelf, &item);
			ListView_SetItemText(_hSelf, i, 1, (LPTSTR)::PathFindExtension(buf->getFileName()));
		}
	}
}
开发者ID:navyjeff,项目名称:nppcr_npp,代码行数:29,代码来源:VerticalFileSwitcherListView.cpp


示例9: LoadReplacements

static void LoadReplacements(HWND hwndDlg)
{
	HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS);

	ListView_DeleteAllItems(hList);
	ListView_SetItemCount(hList, 0);

	int sel = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCURSEL, 0, 0);
	if (sel < 0)
		return;

	AutoreplaceData *data = (AutoreplaceData *) SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, sel, 0);
	if (!data->initialized) {
		data->dict->autoReplace->copyMap(&data->autoReplaceMap);
		data->initialized = TRUE;
	}

	map<tstring,AutoReplacement>::iterator it = data->autoReplaceMap.begin();
	for(int i = 0; it != data->autoReplaceMap.end(); it++, i++) {
		LVITEM item = {0};
		item.mask = LVIF_TEXT | LVIF_PARAM;
		item.iItem = i;
		item.iSubItem = 0;
		item.pszText = (TCHAR *) it->first.c_str();
		item.cchTextMax = (int)it->first.length();
		item.lParam = i;
		
		ListView_InsertItem(hList, &item);

		ListView_SetItemText(hList, i, 1, (TCHAR *) it->second.replace.c_str());
	}

	EnableDisableCtrls(hwndDlg);
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:34,代码来源:options.cpp


示例10: PSList

void PSList() {
	HANDLE hSnapshot;
	PROCESSENTRY32 pEntry;
	char flag;
	char procID[10];
	LVITEM LI;
	int ListCnt=0;

	hSnapshot=CreateToolhelp32Snapshot(TH32CS_SNAPALL,NULL);
	pEntry.dwSize=sizeof(pEntry);
	flag=Process32First(hSnapshot,&pEntry);

	while(flag) {
		ListCnt=ListView_GetItemCount(hListPS);
		LI.mask=LVIF_TEXT|LVIF_PARAM;
		LI.iItem=ListCnt;
		LI.iSubItem=0;
		LI.pszText=pEntry.szExeFile;
		ListView_InsertItem(hListPS,&LI);
		sprintf_s(procID,"%d",pEntry.th32ProcessID);
		ListView_SetItemText(hListPS,ListCnt,1,procID);
	
		flag=Process32Next(hSnapshot,&pEntry);
	}
	
	CloseHandle(hSnapshot);
	ListView_SetExtendedListViewStyle(hListPS,LVS_EX_FULLROWSELECT);
}
开发者ID:ckakannom,项目名称:until2009,代码行数:28,代码来源:DdkHookApp.cpp


示例11: AddListViewItems

/* ************************************
* BOOL AddListViewItems(HWND hwndListView)
* 功能	为List View增加项
* 参数	hwndListView,父窗口
* 返回值	窗口句柄
**************************************/
BOOL AddListViewItems(HWND hwndListView)
{
	LVITEM lvI;
	DWORD index;

	ZeroMemory (&lvI,sizeof(lvI));
	// 有效的项
	lvI.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM | LVIF_STATE;
	// 填充LVITEM
	lvI.state = 0;
	lvI.stateMask = 0;
	// 循环增加
	for (index = 0; index < 3; index++)
	{
		lvI.iItem = index;
		lvI.iImage = 0;
		lvI.iSubItem = 0;
		// 项的文本和长度
		lvI.pszText = "name1"; 
		lvI.cchTextMax = lstrlen(lvI.pszText)+1;
		// 插入项
		if(ListView_InsertItem(hwndListView, &lvI) == -1)
			return FALSE;
		// 设置子项的文本,0 based
		ListView_SetItemText(hwndListView, index, 2, "size a");
	}
	return TRUE;
}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:34,代码来源:Commctrl.c


示例12: InsertLogMsg

void InsertLogMsg(LPTSTR lpszMsg)
{
	int nCount = AddNewLogMsg();

	ListView_SetItemText(g_hLogMsgWnd, nCount, 2, lpszMsg);
	ListView_Scroll(g_hLogMsgWnd, 0, 8);
}
开发者ID:KaSt,项目名称:mir2ei,代码行数:7,代码来源:GameSvr.cpp


示例13: ListView_GetItemState

void CPpcMainWnd::SortFile(int nSort)
{
#define CURRENT_MASK	0x8000
	int i, nFocus = -1;
	FILEINFO* p;
	TCHAR szTitle[MAX_PATH];

	for (i = 0; i < m_pListFile->GetCount(); i++) {
		p = (FILEINFO*)m_pListFile->GetAt(i);
		p->dwUser = (i == m_nCurrent) ? CURRENT_MASK : 0;
		p->dwUser |= ListView_GetItemState(m_hwndLV, i, LVIS_FOCUSED | LVIS_SELECTED);
	}

	m_pListFile->Sort(SortCompareProc, nSort);
	for (i = 0; i < m_pListFile->GetCount(); i++) {
		p = (FILEINFO*)m_pListFile->GetAt(i);
		if (p->dwUser & CURRENT_MASK)
			m_nCurrent = i;
		GetTitle(i, szTitle);
		ListView_SetItemText(m_hwndLV, i, 0, szTitle);
		ListView_SetItemState(m_hwndLV, i, p->dwUser, LVIS_FOCUSED | LVIS_SELECTED);
		if (p->dwUser &LVIS_FOCUSED)
			nFocus = i;
	}
	if (nFocus != -1)
		ListView_EnsureVisible(m_hwndLV, nFocus, FALSE);

	UpdateTrack();
}
开发者ID:jiangzhengwenjz,项目名称:rtoss,代码行数:29,代码来源:PpcMainWnd.cpp


示例14: TaskLstFnStatus

void VerticalFileSwitcherListView::initList()
{
	TaskListInfo taskListInfo;
	::SendMessage(::GetParent(_hParent), WM_GETTASKLISTINFO, (WPARAM)&taskListInfo, TRUE);
	for (size_t i = 0 ; i < taskListInfo._tlfsLst.size() ; i++)
	{
		TaskLstFnStatus & fileNameStatus = taskListInfo._tlfsLst[i];

		TaskLstFnStatus *tl = new TaskLstFnStatus(fileNameStatus._iView, fileNameStatus._docIndex, fileNameStatus._fn, fileNameStatus._status, (void *)fileNameStatus._bufID);

		TCHAR fn[MAX_PATH];
		lstrcpy(fn, ::PathFindFileName(fileNameStatus._fn.c_str()));
		::PathRemoveExtension(fn);

		LVITEM item;
		item.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;

		item.pszText = fn;
		item.iItem = i;
		item.iSubItem = 0;
		item.iImage = fileNameStatus._status;
		item.lParam = (LPARAM)tl;
		ListView_InsertItem(_hSelf, &item);
		ListView_SetItemText(_hSelf, i, 1, (LPTSTR)::PathFindExtension(fileNameStatus._fn.c_str()));
	}
}
开发者ID:navyjeff,项目名称:nppcr_npp,代码行数:26,代码来源:VerticalFileSwitcherListView.cpp


示例15: ListView_GetItemCount

int VerticalFileSwitcherListView::add(int bufferID, int iView)
{
	int index = ListView_GetItemCount(_hSelf);
	Buffer *buf = (Buffer *)bufferID;
	const TCHAR *fileName = buf->getFileName();

	TaskLstFnStatus *tl = new TaskLstFnStatus(iView, 0, fileName, 0, (void *)bufferID);

	TCHAR fn[MAX_PATH];
	lstrcpy(fn, ::PathFindFileName(fileName));
	::PathRemoveExtension(fn);

	LVITEM item;
	item.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;

	item.pszText = fn;
	item.iItem = index;
	item.iSubItem = 0;
	item.iImage = buf->getUserReadOnly()||buf->getFileReadOnly()?2:(buf->isDirty()?1:0);
	item.lParam = (LPARAM)tl;
	ListView_InsertItem(_hSelf, &item);

	ListView_SetItemText(_hSelf, index, 1, ::PathFindExtension(fileName));
	ListView_SetItemState(_hSelf, index, LVIS_FOCUSED|LVIS_SELECTED, LVIS_FOCUSED|LVIS_SELECTED);

	return index;
}
开发者ID:navyjeff,项目名称:nppcr_npp,代码行数:27,代码来源:VerticalFileSwitcherListView.cpp


示例16: ListView_GetItemCount

int VerticalFileSwitcherListView::add(BufferID bufferID, int iView)
{
	int index = ListView_GetItemCount(_hSelf);
	Buffer *buf = static_cast<Buffer *>(bufferID);
	const TCHAR *fileName = buf->getFileName();

	TaskLstFnStatus *tl = new TaskLstFnStatus(iView, 0, fileName, 0, (void *)bufferID);

	TCHAR fn[MAX_PATH];
	lstrcpy(fn, ::PathFindFileName(fileName));
	bool isExtColumn = !(NppParameters::getInstance())->getNppGUI()._fileSwitcherWithoutExtColumn;
	if (isExtColumn)
	{
		::PathRemoveExtension(fn);
	}
	LVITEM item;
	item.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;
	
	item.pszText = fn;
	item.iItem = index;
	item.iSubItem = 0;
	item.iImage = buf->getUserReadOnly()||buf->getFileReadOnly()?2:(buf->isDirty()?1:0);
	item.lParam = (LPARAM)tl;
	ListView_InsertItem(_hSelf, &item);

	if (isExtColumn)
	{
		ListView_SetItemText(_hSelf, index, 1, ::PathFindExtension(fileName));
	}
	ListView_SetItemState(_hSelf, index, LVIS_FOCUSED|LVIS_SELECTED, LVIS_FOCUSED|LVIS_SELECTED);
	
	return index;
}
开发者ID:123vipulj,项目名称:notepad-plus-plus,代码行数:33,代码来源:VerticalFileSwitcherListView.cpp


示例17: switch

/*
** Adds item to log.
**
*/
void CDialogAbout::CTabLog::AddItem(int level, LPCWSTR time, LPCWSTR message)
{
	WCHAR buffer[32];
	LVITEM vitem;
	vitem.mask = LVIF_IMAGE | LVIF_TEXT;
	vitem.iItem = 0;
	vitem.iSubItem = 0;
	vitem.pszText = buffer;
	HWND item;

	switch (level)
	{
	case LOG_ERROR:
		if (!m_Error) return;
		item = GetDlgItem(m_Window, IDC_ABOUTLOG_ERROR_CHECKBOX);
		vitem.iImage = 0;
		break;

	case LOG_WARNING:
		if (!m_Warning) return;
		item = GetDlgItem(m_Window, IDC_ABOUTLOG_WARNING_CHECKBOX);
		vitem.iImage = 1;
		break;

	case LOG_NOTICE:
		if (!m_Notice) return;
		item = GetDlgItem(m_Window, IDC_ABOUTLOG_NOTICE_CHECKBOX);
		vitem.iImage = 2;
		break;

	case LOG_DEBUG:
		if (!m_Debug) return;
		item = GetDlgItem(m_Window, IDC_ABOUTLOG_DEBUG_CHECKBOX);
		vitem.iImage = -1;
		break;
	}

	GetWindowText(item, buffer, 32);
	item = GetDlgItem(m_Window, IDC_ABOUTLOG_ITEMS_LISTVIEW);
	ListView_InsertItem(item, &vitem);
	ListView_SetItemText(item, vitem.iItem, 1, (WCHAR*)time);
	ListView_SetItemText(item, vitem.iItem, 2, (WCHAR*)message);
	if (!ListView_IsItemVisible(item, 0))
	{
		ListView_Scroll(item, 0, 16);
	}
}
开发者ID:testaccountx,项目名称:testrepo,代码行数:51,代码来源:DialogAbout.cpp


示例18: AddItem

void AddItem(DWORD dwNum, struct entry_wav *sWav)
{
    LVITEM lv = {0};
    BYTE bSize[MAX_PATH];
    BYTE bOffset[MAX_PATH];
    BYTE bName[40];

    lv.iItem = 0;
    ListView_InsertItem(hListView, &lv);
    memcpy(bName, sWav->bName, 40);
    FixWavNameFile(bName);
    ListView_SetItemText(hListView, 0, 0, bName);
    sprintf(bOffset, "0x%X", sWav->dwOffset);
    ListView_SetItemText(hListView, 0, 1, bOffset);
    sprintf(bSize, "%d", sWav->dwSize);
    ListView_SetItemText(hListView, 0, 2, bSize);
}
开发者ID:w4kfu,项目名称:homm3_fun,代码行数:17,代码来源:main.c


示例19: UpdateUsersList

static VOID
UpdateUsersList(HWND hwndListView)
{
    NET_API_STATUS netStatus;
    PUSER_INFO_20 pBuffer;
    DWORD entriesread;
    DWORD totalentries;
    DWORD resume_handle = 0;
    DWORD i;
    LV_ITEM lvi;
    INT iItem;


    for (;;)
    {
        netStatus = NetUserEnum(NULL, 20, FILTER_NORMAL_ACCOUNT,
                                (LPBYTE*)&pBuffer,
                                1024, &entriesread,
                                &totalentries, &resume_handle);
        if (netStatus != NERR_Success && netStatus != ERROR_MORE_DATA)
            break;

        for (i = 0; i < entriesread; i++)
        {
           memset(&lvi, 0x00, sizeof(lvi));
           lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE;
           lvi.pszText = pBuffer[i].usri20_name;
           lvi.state = 0;
           lvi.iImage = (pBuffer[i].usri20_flags & UF_ACCOUNTDISABLE) ? 1 : 0;
           iItem = ListView_InsertItem(hwndListView, &lvi);

           ListView_SetItemText(hwndListView, iItem, 1,
                                pBuffer[i].usri20_full_name);

           ListView_SetItemText(hwndListView, iItem, 2,
                                pBuffer[i].usri20_comment);
        }

        NetApiBufferFree(pBuffer);

        /* No more data left */
        if (netStatus != ERROR_MORE_DATA)
            break;
    }

}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:46,代码来源:users.c


示例20: assert

//----------------------------------------------------------------------------------------------------------------------
// POPULATE
//----------------------------------------------------------------------------------------------------------------------
void cListViewComputers::populate ( cMachlist * pMachlist )
{
	assert ( 0 < iQtyColumns );
	assert ( pMachlist );

	if ( ListView_GetItemCount ( hwnd ) )
		ListView_DeleteAllItems ( hwnd );

	LVITEM lvI;
	ZeroMemory ( &lvI, sizeof(lvI) );
	lvI.mask = LVIF_TEXT |  LVIF_PARAM ; 
	lvI.state = 0; 
	lvI.stateMask = 0; 

	int i = 0;
	for ( mojo::cMach * p = pMachlist->pHead; p; p = p->pNext, i++ )
	{
		// if ( p->bExclude )
		//	continue;

		SetLastError(0);
		lvI.iItem = i;
		lvI.iImage = 0;
		lvI.iSubItem = 0;
		lvI.lParam = (LPARAM) ( p->dwSerialNumber );
		lvI.pszText = const_cast<LPWSTR>( p->sName.cstr() );
		lvI.mask = LVIF_TEXT |  LVIF_PARAM | LVIF_STATE ; 
		lvI.state = 1<<12;
		SendMessage ( hwnd, LVM_INSERTITEM, 0, (LPARAM) &lvI );
		lvI.iSubItem = 1;

		if ( 2 <= iQtyColumns )
			ListView_SetItemText ( hwnd, i, 1, L"This is an IP" );

		if ( 3 <= iQtyColumns )
			ListView_SetItemText ( hwnd, i, 2, L"This is a status" );

		if ( 4 <= iQtyColumns )
			ListView_SetItemText ( hwnd, i, 2, L"Screen size" );

		set_item ( i, p );
	}

	InvalidateRect ( hwnd, NULL, true );
	UpdateWindow ( hwnd );
}
开发者ID:XueSlick,项目名称:mojoware,代码行数:49,代码来源:cListViewComputers.cpp



注:本文中的ListView_SetItemText函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ List_count函数代码示例发布时间:2022-05-30
下一篇:
C++ ListView_SetItemState函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap