本文整理汇总了C++中ExtraIcon::setIcon方法的典型用法代码示例。如果您正苦于以下问题:C++ ExtraIcon::setIcon方法的具体用法?C++ ExtraIcon::setIcon怎么用?C++ ExtraIcon::setIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExtraIcon
的用法示例。
在下文中一共展示了ExtraIcon::setIcon方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetVisibility
static void SetVisibility(MCONTACT hContact, int apparentMode, bool clear)
{
if (hContact == NULL)
return;
char *proto = GetContactProto(hContact);
if (IsEmpty(proto))
return;
if (apparentMode <= 0)
apparentMode = db_get_w(hContact, proto, "ApparentMode", 0);
HANDLE hExtraIcon, hIcolib = NULL;
if (db_get_b(hContact, proto, "ChatRoom", 0)) {
// Is chat
hExtraIcon = hExtraChat;
if (apparentMode == ID_STATUS_OFFLINE)
hIcolib = Skin_GetIconHandle("ChatActivity");
}
else {
// Not chat
hExtraIcon = hExtraVisibility;
if (apparentMode == ID_STATUS_OFFLINE)
hIcolib = LoadSkinnedIconHandle(SKINICON_OTHER_INVISIBLE_ALL);
else if (apparentMode == ID_STATUS_ONLINE)
hIcolib = LoadSkinnedIconHandle(SKINICON_OTHER_VISIBLE_ALL);
}
if (hIcolib != NULL || clear) {
ExtraIcon *extra = GetExtraIcon(hExtraIcon);
if (extra)
extra->setIcon((int)hExtraIcon, hContact, hIcolib);
}
}
示例2: GetExtraIcon
MIR_APP_DLL(int) ExtraIcon_Clear(HANDLE hExtraIcon, MCONTACT hContact)
{
if (hExtraIcon == NULL || hContact == NULL)
return -1;
ExtraIcon *extra = GetExtraIcon(hExtraIcon);
if (extra == NULL)
return -1;
return extra->setIcon((INT_PTR)hExtraIcon, hContact, NULL);
}
示例3: ExtraIcon_SetIcon
INT_PTR ExtraIcon_SetIcon(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->setIcon((int)ei->hExtraIcon, ei->hContact, ei->hImage);
}