本文整理汇总了C++中ExtraIcon::setIconByName方法的典型用法代码示例。如果您正苦于以下问题:C++ ExtraIcon::setIconByName方法的具体用法?C++ ExtraIcon::setIconByName怎么用?C++ ExtraIcon::setIconByName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExtraIcon
的用法示例。
在下文中一共展示了ExtraIcon::setIconByName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetGender
static void SetGender(MCONTACT hContact, int gender, bool clear)
{
if (hContact == NULL)
return;
char *proto = GetContactProto(hContact);
if (IsEmpty(proto))
return;
if (gender <= 0)
gender = db_get_b(hContact, proto, "Gender", 0);
if (gender <= 0)
gender = db_get_b(hContact, "UserInfo", "Gender", 0);
const char *ico;
if (gender == 'M')
ico = "gender_male";
else if (gender == 'F')
ico = "gender_female";
else
ico = NULL;
if (ico != NULL || clear) {
ExtraIcon *extra = GetExtraIcon(hExtraGender);
if (extra)
extra->setIconByName((int)hExtraGender, hContact, ico);
}
}
示例2: GetExtraIcon
MIR_APP_DLL(int) ExtraIcon_SetIconByName(HANDLE hExtraIcon, MCONTACT hContact, const char *icoName)
{
if (hExtraIcon == NULL || hContact == NULL)
return -1;
ExtraIcon *extra = GetExtraIcon(hExtraIcon);
if (extra == NULL)
return -1;
return extra->setIconByName((INT_PTR)hExtraIcon, hContact, icoName);
}
示例3: ExtraIcon_SetIconByName
INT_PTR ExtraIcon_SetIconByName(WPARAM wParam, LPARAM lParam)
{
if (wParam == 0)
return -1;
EXTRAICON *ei = (EXTRAICON*)wParam;
if (ei->cbSize < (int)sizeof(EXTRAICON) || ei->hExtraIcon == NULL || ei->hContact == NULL)
return -1;
ExtraIcon *extra = GetExtraIcon(ei->hExtraIcon);
if (extra == NULL)
return -1;
return extra->setIconByName((int)ei->hExtraIcon, ei->hContact, ei->icoName);
}