本文整理汇总了C++中BookmarkItem::getIcon方法的典型用法代码示例。如果您正苦于以下问题:C++ BookmarkItem::getIcon方法的具体用法?C++ BookmarkItem::getIcon怎么用?C++ BookmarkItem::getIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BookmarkItem
的用法示例。
在下文中一共展示了BookmarkItem::getIcon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnBookmarkAsyncIcon
LRESULT BookmarkEditDlg::OnBookmarkAsyncIcon(WPARAM wParam, LPARAM lParam)
{
xpr_sint_t sBookmarkIndex = (xpr_sint_t)wParam;
BookmarkItem *sBookmarkItem = (BookmarkItem *)lParam;
if (sBookmarkItem == XPR_NULL)
return 0;
xpr_sint_t sIndex = -1;
BookmarkItem *sBookmarkItem2 = XPR_NULL;
xpr_sint_t sCount = mListCtrl.GetItemCount();
if (XPR_IS_RANGE(0, sBookmarkIndex, sCount-1))
{
sBookmarkItem2 = (BookmarkItem *)mListCtrl.GetItemData(sBookmarkIndex);
if (sBookmarkItem2 != XPR_NULL && sBookmarkItem2->getSignature() == sBookmarkItem->getSignature())
sIndex = sBookmarkIndex;
}
if (sIndex < 0)
{
sIndex = findSignature(sBookmarkItem->getSignature());
if (sIndex >= 0)
sBookmarkItem2 = (BookmarkItem *)mListCtrl.GetItemData(sIndex);
}
if (sIndex >= 0 && sBookmarkItem2 != XPR_NULL)
{
HICON sIcon = sBookmarkItem->getIcon();
if (sIcon != XPR_NULL)
sIcon = ::DuplicateIcon(XPR_NULL, sIcon);
sBookmarkItem2->setIcon(sIcon);
xpr_sint_t sImage = mImgList.Add(sIcon);
LVITEM sLvItem = {0};
sLvItem.mask = LVIF_IMAGE;
sLvItem.iItem = sIndex;
sLvItem.iImage = sImage;
mListCtrl.SetItem(&sLvItem);
}
return 0;
}
示例2: OnBookmarkAsyncIcon
LRESULT BookmarkToolBar::OnBookmarkAsyncIcon(WPARAM wParam, LPARAM lParam)
{
xpr_sint_t sIndex = (xpr_sint_t)wParam;
BookmarkItem *sBookmarkItem = (BookmarkItem *)lParam;
if (sBookmarkItem == XPR_NULL)
return 0;
if (XPR_IS_RANGE(0, sIndex, BookmarkMgr::instance().getCount()-1))
{
TBBUTTONINFO sTbButtonInfo = {0};
sTbButtonInfo.cbSize = sizeof(TBBUTTONINFO);
sTbButtonInfo.dwMask = TBIF_BYINDEX | TBIF_IMAGE;
sTbButtonInfo.iImage = mImgList.Add(sBookmarkItem->getIcon());
GetToolBarCtrl().SetButtonInfo(sIndex, &sTbButtonInfo);
}
return 0;
}