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


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

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


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

示例1: ProtoAck

/**
* Protocols àcknowledgement
*/
int ProtoAck(WPARAM wparam,LPARAM lparam)
{
	ACKDATA *pAck = (ACKDATA *)lparam;
	if (pAck->type != ACKTYPE_MESSAGE || pAck->result != ACKRESULT_SUCCESS)
		return 0;

	MESSAGE_PROC* p = arMessageProcs.find((MESSAGE_PROC*)&pAck->hProcess);
	if (p == NULL)
		return 0;

	if (iSendAndHistory > 0){
		time_t ltime;
		time(&ltime);

		DBEVENTINFO dbei = { sizeof(dbei) };
		dbei.szModule = "yaRelay";
		dbei.timestamp = ltime;
		dbei.flags = DBEF_SENT | DBEF_UTF;
		dbei.eventType = EVENTTYPE_MESSAGE;
		dbei.cbBlob = (DWORD)strlen(p->msgText) + 1;
		dbei.pBlob = (PBYTE)p->msgText;
		db_event_add(hForwardTo, &dbei);
	}

	mir_free(p->msgText);
	arMessageProcs.remove(p);
	mir_free(p);
	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:32,代码来源:main.cpp

示例2: DbEventTypeGet

static INT_PTR DbEventTypeGet(WPARAM wParam, LPARAM lParam)
{
	DBEVENTTYPEDESCR tmp;
	tmp.module = (char*)wParam;
	tmp.eventType = lParam;
	return (INT_PTR)eventTypes.find(&tmp);
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:7,代码来源:dbutils.cpp

示例3: OnMsgWndEvent

//hookProc ME_MSG_WINDOWEVENT
static int OnMsgWndEvent(WPARAM, LPARAM lParam)
{
	MsgWndData *msgwnd;
	MessageWindowEventData *msgwe = (MessageWindowEventData*)lParam;
	/* sanity check */
	if (msgwe->hContact == NULL)
		return 0;

	switch (msgwe->uType) {
	case MSG_WINDOW_EVT_OPENING:
		msgwnd = gMsgWndList.find((MsgWndData*)&msgwe->hContact);
		if (msgwnd == NULL) {
			msgwnd = new MsgWndData(msgwe->hwndWindow, msgwe->hContact);
			gMsgWndList.insert(msgwnd);
		}
		break;

	case MSG_WINDOW_EVT_CLOSE:
		int i = gMsgWndList.getIndex((MsgWndData*)&msgwe->hContact);
		if (i != -1) {
			delete gMsgWndList[i];
			gMsgWndList.remove(i);
		}
		break;
	}
	return 0;
}
开发者ID:wyrover,项目名称:miranda-ng,代码行数:28,代码来源:svc_flags.cpp

示例4: SetRichCallback

bool SetRichCallback(HWND hwnd, MCONTACT hContact, bool subany, bool subnew)
{
	RichEditData* rdt = g_RichEditList.find((RichEditData*)&hwnd);
	if (rdt == NULL) {
		IRichEditOle* RichEditOle;
		if (SendMessage(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle) == 0)
			return false;
		RichEditOle->Release();

		rdt = new RichEditData;

		rdt->hwnd = hwnd;
		rdt->hContact = hContact;
		rdt->inputarea = (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) == 0;
		rdt->dontReplace = false;
		rdt->tipActive = -1;
		rdt->hToolTip = NULL;
		g_RichEditList.insert(rdt);

		if (subnew)
			mir_subclassWindow(hwnd, RichEditSubclass);
	}
	else {
		if (hContact && !rdt->hContact)
			rdt->hContact = hContact; 

		if (subany) 
			mir_subclassWindow(hwnd, RichEditSubclass);
	}
	return true;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:31,代码来源:richcall.cpp

示例5: IsMsgWnd

//find the dialog info in the stored list
static MsgWndData* IsMsgWnd(HWND hwnd)
{
	WaitForSingleObject(g_hMutex, 2000);
	MsgWndData* res = g_MsgWndList.find((MsgWndData*)&hwnd);
	ReleaseMutex(g_hMutex);

	return res;
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:9,代码来源:dlgboxsubclass.cpp

示例6: srvGetProvider

static INT_PTR srvGetProvider(WPARAM, LPARAM lParam)
{
	if (lParam == 0)
		return 0;

	CRYPTO_PROVIDER tmp;
	tmp.pszName = (LPSTR)lParam;
	return (INT_PTR)arProviders.find(&tmp);
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:9,代码来源:encrypt.cpp

示例7:

MIR_APP_DLL(PROTOCOLDESCRIPTOR*) Proto_IsProtocolLoaded(const char *szProtoName)
{
	if (szProtoName == NULL)
		return NULL;
	
	PROTOCOLDESCRIPTOR tmp;
	tmp.szName = (char*)szProtoName;
	return protos.find(&tmp);
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:9,代码来源:proto_utils.cpp

示例8: RichEditOwnerSubclass

static LRESULT CALLBACK RichEditOwnerSubclass(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	RichEditOwnerData* rdto = g_RichEditOwnerList.find((RichEditOwnerData*)&hwnd);
	if (rdto == NULL)
		return 0;

	switch(uMsg) {
	case WM_COMMAND:
		if (LOWORD(wParam) == IDOK || LOWORD(wParam) == 1624) {
			RichEditData* rdt = g_RichEditList.find((RichEditData*)&rdto->hwndInput);
			if (rdt && (!rdt->inputarea || opt.InputSmileys)) {
				rdt->dontReplace = true;
				CHARRANGE sel = allsel;
				ReplaceSmileysWithText(rdt->hwnd, sel, false);
			}
		}
		break;

	case WM_DESTROY:
		RichEditData* rdt = g_RichEditList.find((RichEditData*)&rdto->hwndInput);
		if (rdt && (!rdt->inputarea || opt.InputSmileys)) {
			CHARRANGE sel = allsel;
			rdt->dontReplace = true;
			ReplaceSmileysWithText(rdt->hwnd, sel, false);
		}
		break;
	}

	LRESULT result = mir_callNextSubclass(hwnd, RichEditOwnerSubclass, uMsg, wParam, lParam); 

	switch(uMsg) {
	case WM_COMMAND:
		if (LOWORD(wParam) == IDOK || LOWORD(wParam) == 1624) {
			RichEditData* rdt = g_RichEditList.find((RichEditData*)&rdto->hwndInput);
			if (rdt) {
				CHARRANGE sel = allsel;
				if (!result) ReplaceContactSmileys(rdt, sel, false, false);
				rdt->dontReplace = false;
			}
		}
		break;
	}
	return result;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:44,代码来源:richcall.cpp

示例9: amAddHandleToChain

/*
*  Add contact handle to requests queue
*/
static int amAddHandleToChain(MCONTACT hContact)
{
	mir_cslockfull lck(amCS);
	if (amItems.find((HANDLE)hContact) != NULL)
		return 0;

	amItems.insert((HANDLE)hContact);
	lck.unlock();
	SetEvent(hamProcessEvent);
	return 1;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:14,代码来源:modern_awaymsg.cpp

示例10: delContact

// delete contact from the list of secureIM users
void delContact(HANDLE hContact)
{
	pUinKey p = arClist.find((pUinKey)&hContact);
	if (p) {
		arClist.remove(p);

		cpp_delete_context(p->cntx); p->cntx = 0;
		mir_free(p->tmp);
		mir_free(p->msgSplitted);
		mir_free(p);
	}
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:13,代码来源:crypt_lists.cpp

示例11: setPos

static INT_PTR setPos(WPARAM wParam, LPARAM lParam)
{
	FLASHAVATAR* hFA = (FLASHAVATAR*)wParam;
	RECT rc = *((LPRECT)lParam);
	flash_avatar_item key(hFA->hContact, *hFA, NULL);

	Lock l(cs);
	flash_avatar_item *item = FlashList.find(&key);
	if (item)
		SetWindowPos(item->hFA.hWindow, HWND_TOP, rc.left, rc.top, rc.right, rc.bottom, SWP_SHOWWINDOW);

	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:13,代码来源:cflash.cpp

示例12: setEmoFace

static INT_PTR setEmoFace(WPARAM wParam, LPARAM lParam)
{
	FLASHAVATAR* hFA = (FLASHAVATAR*)wParam;
	flash_avatar_item key(hFA->hContact, *hFA, NULL);

	Lock l(cs);
	flash_avatar_item *item = FlashList.find(&key);
	if (item && item->pFlash) {
		IShockwaveFlash* flash = item->pFlash;
		flash->SetVariable(L"face.emotion", (BSTR)lParam);
	}
	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:13,代码来源:cflash.cpp

示例13: getInfo

static INT_PTR getInfo(WPARAM wParam, LPARAM)
{
	FLASHAVATAR* hFA = (FLASHAVATAR*)wParam;
	flash_avatar_item key(hFA->hContact, *hFA, NULL);

	Lock l(cs);
	flash_avatar_item *item = FlashList.find(&key);
	if (item) {
		//IShockwaveFlash* flash = item->pFlash;
		hFA->hWindow = item->hFA.hWindow;
		hFA->cUrl = item->hFA.cUrl;
		hFA->cProto = item->hFA.cProto;
	}
	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:15,代码来源:cflash.cpp

示例14: GetMenuObjbyId

TIntMenuObject* GetMenuObjbyId(int id)
{
	switch (id) {
	case MO_MAIN:    id = hMainMenuObject;    break;
	case MO_CONTACT: id = hContactMenuObject; break;
	case MO_STATUS:  id = hStatusMenuObject;  break;
	case MO_PROTO:
		if (db_get_b(NULL, "CList", "MoveProtoMenus", true))
			id = hStatusMenuObject;
		else
			id = hMainMenuObject;
	}

	return g_menus.find((TIntMenuObject*)&id);
}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:15,代码来源:menu_utils.cpp

示例15: setBkColor

static INT_PTR setBkColor(WPARAM wParam, LPARAM lParam)
{
	FLASHAVATAR* hFA = (FLASHAVATAR*)wParam;
	COLORREF clr = (COLORREF)lParam;
	flash_avatar_item key(hFA->hContact, *hFA, NULL);

	Lock l(cs);
	flash_avatar_item *item = FlashList.find(&key);
	if (item && item->pFlash) {
		IShockwaveFlash* flash = item->pFlash;

		char buf[10];
		mir_snprintf(buf, sizeof(buf), "%02X%02X%02X", LOBYTE(LOWORD(clr)), HIBYTE(LOWORD(clr)), LOBYTE(HIWORD(clr)));
		flash->put_BGColor(_bstr_t(buf));
	}
	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:17,代码来源:cflash.cpp


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