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


C++ GetContactProto函数代码示例

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


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

示例1: HookContactSettingChanged

static int HookContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
	DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
	char *szProto = GetContactProto(hContact);
	if (strcmpnull(cws->szModule, "CList") && strcmpnull(cws->szModule, szProto))
		return 0;

	WindowList_Broadcast(g_hSendWindowList, DM_UPDATETITLE, 0, 0);
	WindowList_Broadcast(g_hRecvWindowList, DM_UPDATETITLE, 0, 0);
	return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:11,代码来源:main.cpp

示例2: CreateTemporaryContactForItem

static MCONTACT CreateTemporaryContactForItem(HWND hwndDlg, TRecvContactsData *wndData, int iItem)
{
	TCHAR *caUIN = ListView_GetItemTextEx(GetDlgItem(hwndDlg, IDC_CONTACTS), iItem, 0);
	char *szProto = GetContactProto(wndData->mhContact);
	wndData->rhSearch = (HANDLE)CallProtoService(szProto, PS_BASICSEARCH, 0, (LPARAM)caUIN); // find it
	replaceStrT(wndData->haUin, caUIN);
	for (int j = 0; j < wndData->cbReceived; j++)
		if (!lstrcmp(wndData->maReceived[j]->mcaUIN, caUIN))
			return (MCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(PALF_TEMPORARY, j), (LPARAM)wndData->mhDbEvent);
	return NULL;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:11,代码来源:receive.cpp

示例3: HideNudgeButton

void HideNudgeButton(MCONTACT hContact)
{
	char *szProto = GetContactProto(hContact);
	if (!ProtoServiceExists(szProto, PS_SEND_NUDGE)) {
		BBButton bbd = { sizeof(bbd) };
		bbd.bbbFlags = BBSF_HIDDEN | BBSF_DISABLED;
		bbd.pszModuleName = "Nudge";
		bbd.dwButtonID = 6000;
		CallService(MS_BB_SETBUTTONSTATE, hContact, (LPARAM)&bbd);
	}
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:11,代码来源:main.cpp

示例4: ContactChangeGroup

INT_PTR ContactChangeGroup(WPARAM hContact, LPARAM lParam)
{
	CallService(MS_CLUI_CONTACTDELETED, hContact, 0);
	if ((HANDLE)lParam == NULL)
		db_unset(hContact, "CList", "Group");
	else
		db_set_s(hContact, "CList", "Group", (char*)CallService(MS_CLIST_GROUPGETNAME2, lParam, (LPARAM)(int*)NULL));

	CallService(MS_CLUI_CONTACTADDED, hContact, ExtIconFromStatusMode(hContact, GetContactProto(hContact), GetContactStatus(hContact)));
	return 0;
}
开发者ID:martok,项目名称:miranda-ng,代码行数:11,代码来源:contact.cpp

示例5: onContactSettingChanged

int onContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
	DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
	const char *proto = GetContactProto((MCONTACT)hContact);
	if (!proto) return 0;

	if (!strcmp(cws->szModule, proto))
		if (!strcmp(cws->szSetting, "Auth") || !strcmp(cws->szSetting, "Grant") || !strcmp(cws->szSetting, "ServerId") || !strcmp(cws->szSetting, "ContactType"))
			onExtraImageApplying(hContact, 1);

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

示例6: onContactSettingChanged

int onContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
    char *proto = GetContactProto(wParam);
    if (!proto)
        return 0;

    DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
    if (!strcmp(cws->szModule, proto) && !strcmp(cws->szSetting, "MirVer"))
        ExtraIconsApply(wParam, 1);

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

示例7: ReloadExtraInfo

void ReloadExtraInfo(MCONTACT hContact)
{
	if(hContact && pcli->hwndContactTree) {
		int index = cfg::getCache(hContact, NULL);
		if(index >= 0 && index < cfg::nextCacheEntry) {
			char *szProto = GetContactProto(hContact);

			TZ_LoadTimeZone(hContact, &cfg::eCache[index], szProto);
			InvalidateRect(pcli->hwndContactTree, NULL, FALSE);
		}
	}
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:12,代码来源:clcitems.cpp

示例8: GetInstanceByHContact

// Helper functions
static WhatsAppProto* GetInstanceByHContact(MCONTACT hContact)
{
	char *proto = GetContactProto(hContact);
	if (!proto)
		return 0;

	for (int i = 0; i < g_Instances.getCount(); i++)
		if (!mir_strcmp(proto, g_Instances[i].m_szModuleName))
			return &g_Instances[i];

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

示例9: IcqGetInstanceByHContact

static CIcqProto* IcqGetInstanceByHContact(HANDLE hContact)
{
	char* szProto = GetContactProto(hContact);
	if (szProto == NULL)
		return NULL;

	for (int i = 0; i < g_Instances.getCount(); i++)
		if (!strcmp(szProto, g_Instances[i]->m_szModuleName))
			return g_Instances[i];

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

示例10: memset

std::wstring EventList::GetMyId()
{
	std::wstring myId;
	CONTACTINFO ci;
	memset(&ci, 0, sizeof(ci));
	ci.cbSize = sizeof(ci);
	ci.szProto = GetContactProto(hContact);
	ci.hContact = 0;
	ci.dwFlag = CNF_DISPLAYUID | CNF_TCHAR;
	GetInfo(ci, myId);
	return myId;
}
开发者ID:biddyweb,项目名称:miranda-ng,代码行数:12,代码来源:EventList.cpp

示例11: GetContactId

inline std::wstring GetContactId(MCONTACT hContact)
{
	std::wstring id;
	CONTACTINFO ci;
	memset(&ci, 0, sizeof(ci));
	ci.cbSize = sizeof(ci);
	ci.szProto = GetContactProto(hContact);
	ci.hContact = hContact;
	ci.dwFlag = CNF_DISPLAYUID | CNF_TCHAR;
	GetInfo(ci, id);
	return id;
}
开发者ID:biddyweb,项目名称:miranda-ng,代码行数:12,代码来源:EventList.cpp

示例12: CreateTemporaryContactForItem

static HANDLE CreateTemporaryContactForItem(HWND hwndDlg, TRecvContactsData* wndData, int iItem)
{
  char* caUIN = ListView_GetItemTextEx(GetDlgItem(hwndDlg, IDC_CONTACTS), iItem, 0);
  char* szProto = GetContactProto(wndData->mhContact);
  wndData->rhSearch = (HANDLE)SRCCallProtoService(szProto, PS_BASICSEARCH, 0, (LPARAM)caUIN); // find it
  SAFE_FREE((void**)&wndData->haUin);
  wndData->haUin = caUIN;
  for (int j = 0; j < wndData->cbReceived; j++)
    if (!strcmpnull(wndData->maReceived[j]->mcaUIN, caUIN))
      return (HANDLE)SRCCallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(PALF_TEMPORARY, j), (LPARAM)wndData->mhDbEvent);
  return NULL;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:12,代码来源:receive.cpp

示例13: GetProtoDefaultAvatar

protoPicCacheEntry* GetProtoDefaultAvatar(MCONTACT hContact)
{
	char *szProto = GetContactProto(hContact);
	if (szProto) {
		for (int i = 0; i < g_ProtoPictures.getCount(); i++) {
			protoPicCacheEntry& p = g_ProtoPictures[i];
			if (!mir_strcmp(p.szProtoname, szProto) && p.hbmPic != NULL)
				return &g_ProtoPictures[i];
		}
	}
	return NULL;
}
开发者ID:martok,项目名称:miranda-ng,代码行数:12,代码来源:utils.cpp

示例14: GetContactProto

//---------------------------------------------------------------------------
void CSend::SetContact(MCONTACT hContact)
{
	m_hContact = hContact;
	if (hContact) {
		m_pszProto = GetContactProto(hContact);
		m_ChatRoom = db_get_b(hContact, m_pszProto, "ChatRoom", 0);
		/*
		m_PFflag = hasCap(PF1_URLSEND);
		m_PFflag = hasCap(PF1_CHAT);
		m_PFflag = hasCap(PF1_IMSEND);// */
	}
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:13,代码来源:CSend.cpp

示例15: ReloadExtraInfo

void ReloadExtraInfo(MCONTACT hContact)
{
	if (hContact && pcli->hwndContactTree) {
		TExtraCache *p = cfg::getCache(hContact, NULL);
		if (p) {
			char *szProto = GetContactProto(hContact);

			TZ_LoadTimeZone(hContact, p, szProto);
			InvalidateRect(pcli->hwndContactTree, NULL, FALSE);
		}
	}
}
开发者ID:fatty-,项目名称:miranda-ng,代码行数:12,代码来源:clcitems.cpp


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