当前位置: 首页>>代码示例>>C++>>正文


C++ LIST::getCount方法代码示例

本文整理汇总了C++中LIST::getCount方法的典型用法代码示例。如果您正苦于以下问题:C++ LIST::getCount方法的具体用法?C++ LIST::getCount怎么用?C++ LIST::getCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LIST的用法示例。


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

示例1: GetCurrentThreadId

MIR_CORE_DLL(INT_PTR) Thread_Pop()
{
	if (WaitForSingleObject(hStackMutex, INFINITE) == WAIT_OBJECT_0) {
		DWORD dwThreadId = GetCurrentThreadId();
		for (int j = 0; j < threads.getCount(); j++) {
			THREAD_WAIT_ENTRY *p = threads[j];
			if (p->dwThreadId == dwThreadId) {
				SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
				CloseHandle(p->hThread);
				threads.remove(j);
				mir_free(p);

				if (!threads.getCount()) {
					threads.destroy();
					ReleaseMutex(hStackMutex);
					SetEvent(hThreadQueueEmpty); // thread list is empty now
					return 0;
				}

				ReleaseMutex(hStackMutex);
				return 0;
			}
		}
		ReleaseMutex(hStackMutex);
	}
	return 1;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:27,代码来源:threads.cpp

示例2: UnloadNewPluginsModule

void UnloadNewPluginsModule(void)
{
	int i;

	if ( !bModuleInitialized ) return;

	// unload everything but the DB
	for ( i = pluginList.getCount()-1; i >= 0; i-- ) {
		pluginEntry* p = pluginList[i];
		if ( !(p->pclass & PCLASS_DB) && p != pluginList_crshdmp )
			Plugin_Uninit( p );
	}

    if ( pluginList_crshdmp )
		Plugin_Uninit( pluginList_crshdmp );

	// unload the DB
	for ( i = pluginList.getCount()-1; i >= 0; i-- ) {
		pluginEntry* p = pluginList[i];
		Plugin_Uninit( p );
	}

	if ( hPluginListHeap ) HeapDestroy(hPluginListHeap);
	hPluginListHeap=0;

	pluginList.destroy();
	pluginListAddr.destroy();
	UninitIni();
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:29,代码来源:newplugins.cpp

示例3: BB_UpdateIcons

void BB_UpdateIcons(HWND hdlg, TWindowData *dat)
{
	HWND hwndBtn = NULL;

	for (int i = 0; i < LButtonsList.getCount(); i++) {
		CustomButtonData *cbd = LButtonsList[i];
		if (cbd) {
			if (!cbd->bSeparator)
				hwndBtn = GetDlgItem(hdlg, cbd->dwButtonCID);

			if (hwndBtn && cbd->hIcon)
				SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->hIcon));
		}
	}

	hwndBtn = NULL;
	for (int i = 0; i < RButtonsList.getCount(); i++) {
		CustomButtonData *cbd = RButtonsList[i];
		if (cbd) {
			if (!cbd->bSeparator)
				hwndBtn = GetDlgItem(hdlg, cbd->dwButtonCID);

			if (hwndBtn && cbd->hIcon)
				SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->hIcon));
		}
	}
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:27,代码来源:buttonsbar.cpp

示例4: tszName

MIR_CORE_DLL(int) TimeZone_SelectListItem(MCONTACT hContact, LPCSTR szModule, HWND hWnd, DWORD dwFlags)
{
	const ListMessages *lstMsg = GetListMessages(hWnd, dwFlags);
	if (lstMsg == NULL)
		return -1;

	if (szModule == NULL) szModule = "UserInfo";

	int iSelection = 0;
	ptrT tszName(db_get_tsa(hContact, szModule, "TzName"));
	if (tszName != NULL) {
		unsigned hash = mir_hashstrT(tszName);
		for (int i = 0; i < g_timezonesBias.getCount(); i++) {
			if (hash == g_timezonesBias[i]->hash) {
				iSelection = i + 1;
				break;
			}
		}
	}
	else {
		signed char cBias = db_get_b(hContact, szModule, "Timezone", -100);
		if (cBias != -100) {
			int iBias = cBias * 30;
			for (int i = 0; i < g_timezonesBias.getCount(); i++) {
				if (iBias == g_timezonesBias[i]->tzi.Bias) {
					iSelection = i + 1;
					break;
				}
			}
		}
	}

	SendMessage(hWnd, lstMsg->setSel, iSelection, 0);
	return iSelection;
}
开发者ID:ybznek,项目名称:miranda-ng,代码行数:35,代码来源:timezones.cpp

示例5: CB_ReInitCustomButtons

void CB_ReInitCustomButtons()
{
	for (int i = 0; i < LButtonsList.getCount(); i++) {
		CustomButtonData *cbd = LButtonsList[i];

		if (cbd->opFlags & BBSF_NTBSWAPED || cbd->opFlags & BBSF_NTBDESTRUCT) {
			cbd->opFlags ^= BBSF_NTBSWAPED;

			if (!(cbd->opFlags & BBSF_NTBDESTRUCT))
				RButtonsList.insert(cbd);

			LButtonsList.remove(i);
			i--;
		}
	}

	for (int i = 0; i < RButtonsList.getCount(); i++) {
		CustomButtonData* cbd = RButtonsList[i];
		if (cbd->opFlags & BBSF_NTBSWAPED || cbd->opFlags & BBSF_NTBDESTRUCT) {
			cbd->opFlags ^= BBSF_NTBSWAPED;

			if (!(cbd->opFlags & BBSF_NTBDESTRUCT))
				LButtonsList.insert(cbd);

			RButtonsList.remove(i);
			i--;
		}
	}
	M.BroadcastMessage(DM_BBNEEDUPDATE, 0, 0);
	M.BroadcastMessage(DM_LOADBUTTONBARICONS, 0, 0);
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:31,代码来源:buttonsbar.cpp

示例6: RebuildListsBasedOnGroups

void RebuildListsBasedOnGroups(LIST<ExtraIconGroup> &groups)
{
	extraIconsByHandle.destroy();

	for (int i=0; i < registeredExtraIcons.getCount(); i++)
		extraIconsByHandle.insert(registeredExtraIcons[i]);

	for (int k=0; k < extraIconsBySlot.getCount(); k++) {
		ExtraIcon *extra = extraIconsBySlot[k];
		if (extra->getType() == EXTRAICON_TYPE_GROUP)
			delete extra;
	}
	extraIconsBySlot.destroy();

	for (int i=0; i < groups.getCount(); i++) {
		ExtraIconGroup *group = groups[i];

		for (int j = 0; j < group->m_items.getCount(); j++)
			extraIconsByHandle.put(group->m_items[j]->getID()-1, group);

		extraIconsBySlot.insert(group);
	}

	for (int k=0; k < extraIconsByHandle.getCount(); k++) {
		ExtraIcon *extra = extraIconsByHandle[k];
		if (extra->getType() != EXTRAICON_TYPE_GROUP)
			extraIconsBySlot.insert(extra);
	}
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:29,代码来源:extraicons.cpp

示例7: msgQueue_processack

void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char* szErr)
{
	MCONTACT hMeta = db_mc_getMeta(hContact);

	mir_cslockfull lck(csMsgQueue);
	for (int i = 0; i < msgQueue.getCount(); i++) {
		TMsgQueue *item = msgQueue[i];
		if ((item->hContact == hContact || item->hContact == hMeta) && item->id == id) {
			msgQueue.remove(i); i--;

			if (!msgQueue.getCount() && timerId) {
				KillTimer(NULL, timerId);
				timerId = 0;
			}
			lck.unlock();

			if (success) {
				mir_free(item->szMsg);
				mir_free(item);
			}
			else MessageFailureProcess(item, szErr);
			break;
		}
	}
}
开发者ID:Ganster41,项目名称:miranda-ng,代码行数:25,代码来源:cmdlist.cpp

示例8: DefWindowProc

static LRESULT CALLBACK PopupThreadManagerWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	PopupWnd2 *wnd = NULL;
	if (message == UTM_ADD_WINDOW || message == UTM_UPDATE_WINDOW || message == UTM_REMOVE_WINDOW || message == UTM_REQUEST_REMOVE)
		if (!(wnd = (PopupWnd2 *)lParam))
			return 0;

	switch (message) {
	case UTM_STOP_THREAD:
		gTerminating = true;
		if (db_get_b(NULL, MODULNAME, "FastExit", 0))
			for (int i = 0; i < popupList.getCount(); ++i)
				PUDeletePopup(popupList[i]->getHwnd());
		PostQuitMessage(0);
		break;

	case UTM_ADD_WINDOW:
		if (gTerminating)
			break;
		UpdatePopupPosition(popupList.getCount() ? popupList[popupList.getCount() - 1] : 0, wnd);
		popupList.insert(wnd);
		++nPopups;
		wnd->callMethodAsync(&PopupWnd2::m_show, 0);
		break;

	case UTM_UPDATE_WINDOW:
		RepositionPopups();
		break;

	case UTM_REQUEST_REMOVE:
		if ((PopupOptions.LeaveHovered && gLockCount) || (wnd && wnd->isLocked()))
			wnd->updateTimer();
		else
			PostMessage(wnd->getHwnd(), WM_CLOSE, 0, 0);
		break;

	case UTM_REMOVE_WINDOW:
	{
		for (int i = popupList.getCount() - 1; i >= 0; i--)
			if (popupList[i] == wnd)
				popupList.remove(i);
	}
	RepositionPopups();
	--nPopups;
	delete wnd;
	break;

	case UTM_LOCK_QUEUE:
		++gLockCount;
		break;

	case UTM_UNLOCK_QUEUE:
		if (--gLockCount < 0)
			gLockCount = 0;
		break;

	}
	return DefWindowProc(hwnd, message, wParam, lParam);
}
开发者ID:martok,项目名称:miranda-ng,代码行数:59,代码来源:popup_thread.cpp

示例9:

	~TTreeList_ItemInfo()
	{
		for (int i = text.getCount(); i--;)
			mir_free(text[i]);

		for (int k = subItems.getCount(); k--;)
			delete subItems[k];
	}
开发者ID:martok,项目名称:miranda-ng,代码行数:8,代码来源:jabber_treelist.cpp

示例10: CB_ModifyButton

static INT_PTR CB_ModifyButton(WPARAM, LPARAM lParam)
{
	BBButton *bbdi = (BBButton *)lParam;
	if (!bbdi)
		return 1;

	bool bFound = 1;
	CustomButtonData *cbd = NULL;
	{
		mir_cslock lck(ToolBarCS);

		for (int i = 0; i < LButtonsList.getCount(); i++) {
			cbd = LButtonsList[i];
			if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
				bFound = true;
				break;
			}
		}

		if (!bFound) {
			for (int i = 0; i < RButtonsList.getCount(); i++) {
				cbd = RButtonsList[i];
				if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
					bFound = true;
					break;
				}
			}
		}

		if (bFound) {
			if (bbdi->pszTooltip) {
				mir_free(cbd->ptszTooltip);
				if (bbdi->bbbFlags & BBBF_ANSITOOLTIP)
					cbd->ptszTooltip = mir_a2u(bbdi->pszTooltip);
				else
					cbd->ptszTooltip = mir_tstrdup(bbdi->ptszTooltip);
			}
			if (bbdi->hIcon)
				cbd->hIcon = bbdi->hIcon;
			if (bbdi->bbbFlags) {
				cbd->bHidden = (bbdi->bbbFlags & BBBF_HIDDEN) != 0;
				cbd->bLSided = (bbdi->bbbFlags & BBBF_ISLSIDEBUTTON) != 0;
				cbd->bRSided = (bbdi->bbbFlags & BBBF_ISRSIDEBUTTON) != 0;
				cbd->bCanBeHidden = (bbdi->bbbFlags & BBBF_CANBEHIDDEN) != 0;
				cbd->bChatButton = (bbdi->bbbFlags & BBBF_ISCHATBUTTON) != 0;
				cbd->bIMButton = (bbdi->bbbFlags & BBBF_ISIMBUTTON) != 0;
				cbd->bDisabled = (bbdi->bbbFlags & BBBF_DISABLED) != 0;
			}
		}
	}

	if (bFound)
		M.BroadcastMessage(DM_BBNEEDUPDATE, 0, (LPARAM)cbd);
	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:55,代码来源:buttonsbar.cpp

示例11: UnloadExtraIconsModule

void UnloadExtraIconsModule(void)
{
	for (int k = 0; k < extraIconsBySlot.getCount(); k++) {
		ExtraIcon *extra = extraIconsBySlot[k];
		if (extra->getType() == EXTRAICON_TYPE_GROUP)
			delete extra;
	}

	for (int i = 0; i < registeredExtraIcons.getCount(); i++)
		delete registeredExtraIcons[i];
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:11,代码来源:extraicons.cpp

示例12: RichEditData_Destroy

void  RichEditData_Destroy(void)
{
	int i;
	for (i=g_RichEditList.getCount()-1; i >= 0; i--) 
		CloseRichCallback(g_RichEditList[i]->hwnd);
	g_RichEditList.destroy();

	for (i=g_RichEditOwnerList.getCount()-1; i >= 0; i--) 
		CloseRichOwnerCallback(g_RichEditOwnerList[i]->hwnd);
	g_RichEditOwnerList.destroy();
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:11,代码来源:richcall.cpp

示例13: BB_RefreshTheme

void BB_RefreshTheme(const TWindowData *dat)
{
	for (int i = 0; i < RButtonsList.getCount(); i++) {
		CustomButtonData* cbd = RButtonsList[i];
		SendMessage(GetDlgItem(dat->hwnd, cbd->dwButtonCID), WM_THEMECHANGED, 0, 0);
	}
	for (int i = 0; i < LButtonsList.getCount(); i++) {
		CustomButtonData* cbd = LButtonsList[i];
		SendMessage(GetDlgItem(dat->hwnd, cbd->dwButtonCID), WM_THEMECHANGED, 0, 0);
	}
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:11,代码来源:buttonsbar.cpp

示例14: GetPluginNameByInstance

char * GetPluginNameByInstance( HINSTANCE hInstance )
{
	int i = 0;
	if ( pluginList.getCount() == 0) return NULL;
	for (i = 0; i <  pluginList.getCount(); i++)
	{
		pluginEntry* pe = pluginList[i];
		if (pe->bpi.pluginInfo && pe->bpi.hInst == hInstance)
			return pe->bpi.pluginInfo->shortName;
	}
	return NULL;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:12,代码来源:newplugins.cpp

示例15: FreeResidentSettings

void FreeResidentSettings()
{
	for (int i = 0; i < m_lResidentSettings.getCount(); i++) {
		mir_free(m_lResidentSettings[i]);
	}
	m_lResidentSettings.destroy();

	for (int i = 0; i < m_lResidentModules.getCount(); i++) {
		mir_free(m_lResidentModules[i]);
	}
	m_lResidentModules.destroy();
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:12,代码来源:modsettingenum.cpp


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