本文整理汇总了C++中BookmarkItem::getSignature方法的典型用法代码示例。如果您正苦于以下问题:C++ BookmarkItem::getSignature方法的具体用法?C++ BookmarkItem::getSignature怎么用?C++ BookmarkItem::getSignature使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BookmarkItem
的用法示例。
在下文中一共展示了BookmarkItem::getSignature方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}
示例3: findSignature
xpr_sint_t BookmarkEditDlg::findSignature(xpr_uint_t aSignature)
{
xpr_sint_t i;
xpr_sint_t sCount;
BookmarkItem *sBookmarkItem;
sCount = mListCtrl.GetItemCount();
for (i = 0; i < sCount; ++i)
{
sBookmarkItem = (BookmarkItem *)mListCtrl.GetItemData(i);
if (sBookmarkItem == XPR_NULL)
continue;
if (sBookmarkItem->getSignature() == aSignature)
return i;
}
return -1;
}