本文整理汇总了C++中BookmarkItem::setIcon方法的典型用法代码示例。如果您正苦于以下问题:C++ BookmarkItem::setIcon方法的具体用法?C++ BookmarkItem::setIcon怎么用?C++ BookmarkItem::setIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BookmarkItem
的用法示例。
在下文中一共展示了BookmarkItem::setIcon方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnShellAsyncIcon
LRESULT BookmarkEditDlg::OnShellAsyncIcon(WPARAM wParam, LPARAM lParam)
{
ShellIcon::AsyncIcon *sAsyncIcon = (ShellIcon::AsyncIcon *)wParam;
if (sAsyncIcon == XPR_NULL)
return 0;
//if (sAsyncIcon->uCode == m_uCode)
{
xpr_sint_t sIndex = -1;
BookmarkItem *sBookmarkItem = XPR_NULL;
if (sAsyncIcon->mItem != -1 && sAsyncIcon->mItem >= 0)
{
sBookmarkItem = (BookmarkItem *)mListCtrl.GetItemData((xpr_sint_t)sAsyncIcon->mItem);
if (sBookmarkItem != XPR_NULL && sBookmarkItem->getSignature() == sAsyncIcon->mSignature)
sIndex = (xpr_sint_t)sAsyncIcon->mItem;
}
if (sIndex < 0)
{
sIndex = findSignature(sAsyncIcon->mSignature);
if (sIndex >= 0)
sBookmarkItem = (BookmarkItem *)mListCtrl.GetItemData(sIndex);
}
if (sIndex >= 0 && sBookmarkItem != XPR_NULL)
{
HICON sIcon = sAsyncIcon->mResult.mIcon;
if (sIcon == XPR_NULL)
sIcon = BookmarkMgr::instance().getTypeIcon(BookmarkMgr::IconTypeNot, XPR_TRUE);
sBookmarkItem->setIcon(sIcon);
sAsyncIcon->mResult.mIcon = XPR_NULL;
xpr_sint_t sImage = mImgList.Add(sIcon);
LVITEM sLvItem = {0};
sLvItem.mask = LVIF_IMAGE;
sLvItem.iItem = sIndex;
sLvItem.iImage = sImage;
mListCtrl.SetItem(&sLvItem);
}
}
XPR_SAFE_DELETE(sAsyncIcon);
return 0;
}