本文整理汇总了C++中CDiskObjectPtr::GetUniqueID方法的典型用法代码示例。如果您正苦于以下问题:C++ CDiskObjectPtr::GetUniqueID方法的具体用法?C++ CDiskObjectPtr::GetUniqueID怎么用?C++ CDiskObjectPtr::GetUniqueID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDiskObjectPtr
的用法示例。
在下文中一共展示了CDiskObjectPtr::GetUniqueID方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Visit
void CNBTreeView::Visit(CDiskObjectPtr o)
{
const CObjectUIHandler *pHandler = CObjectUIHandler::GetUIHandler(o);
switch ( m_nAction )
{
case NDASBINDVIEW_INSERT_OBJECT:
{
m_htiLast = CTreeViewCtrlEx::InsertItem(
pHandler->GetTitle(o),
pHandler->GetIconIndex(o),
pHandler->GetSelectedIconIndex(o),
m_htiParent,
TVI_LAST
);
m_htiLast.SetData( o->GetUniqueID() );
m_mapIDToTreeItem[o->GetUniqueID()] = m_htiLast;
Expand(m_htiParent, TVE_EXPAND);
}
break;
case NDASBINDVIEW_UPDATE_OBJECT:
{
CTreeItem htiUpdate = m_mapIDToTreeItem[o->GetUniqueID()];
htiUpdate.SetText( pHandler->GetTitle(o) );
htiUpdate.SetImage(
pHandler->GetIconIndex(o),
pHandler->GetSelectedIconIndex(o)
);
}
}
};
示例2: DeleteDiskObject
void CNBListViewCtrl::DeleteDiskObject(CDiskObjectPtr o)
{
int nItemCount = CListViewCtrl::GetItemCount();
for (int i=0; i < nItemCount; i++ )
{
if ( GetItemData(i) == o->GetUniqueID() )
{
CListViewCtrl::DeleteItem( i );
break;
}
}
m_mapObject.erase( o->GetUniqueID() );
}
示例3: FindDiskObjectItem
int CNBListViewCtrl::FindDiskObjectItem(CDiskObjectPtr o)
{
LVFINDINFO info;
info.flags = LVFI_PARAM;
info.lParam = o->GetUniqueID();
return CListViewCtrl::FindItem(&info, -1);
}
示例4: AddDiskObject
void CNBListViewCtrl::AddDiskObject(CDiskObjectPtr o)
{
LVITEM lvItem = { 0 };
const CObjectUIHandler *pHandler = CObjectUIHandler::GetUIHandler(o);
WTL::CString strName = pHandler->GetTitle(o);
WTL::CString strCapacity;
strCapacity.FormatMessage(
IDS_DISKPROPERTYPAGE_SIZE_IN_GB,
pHandler->GetSizeInMB( o ) / 1024,
(pHandler->GetSizeInMB( o ) % 1024) / 10
);
lvItem.mask = LVIF_TEXT | LVIF_PARAM;
lvItem.iItem = GetItemCount();
lvItem.pszText = strName.LockBuffer(); //LPSTR_TEXTCALLBACK;
lvItem.lParam = static_cast<LPARAM>(o->GetUniqueID());
CListViewCtrl::InsertItem( &lvItem );
CListViewCtrl::SetItemText(lvItem.iItem, 1, strCapacity.LockBuffer() );
m_mapObject[o->GetUniqueID()] = o;
}
示例5: InsertDiskObject
void CNBTreeView::InsertDiskObject(CDiskObjectPtr o, CDiskObjectPtr parent)
{
if ( parent.get() == NULL )
{
m_htiParent = TVI_ROOT;
m_htiLast = m_htiParent;
}
else
{
m_htiParent = m_mapIDToTreeItem[parent->GetUniqueID()];
if ( m_htiParent.IsNull() )
m_htiParent = TVI_ROOT;
m_htiLast = m_htiParent;
}
m_nAction = NDASBINDVIEW_INSERT_OBJECT;
o->Accept( o, this );
}
示例6: Visit
void CMainFrame::Visit(CDiskObjectPtr o)
{
m_mapObject.insert( std::make_pair(o->GetUniqueID(), o) );
}