IncludeVolatile Example for C++ 6.0 and later
short nRet;
CString csItem;
IDicomDSElementPtr pCurrentElement=NULL;
m_pLEADDicomDS->EnableMethodErrors = FALSE;
//list all elements
m_pLEADDicomDS->IncludeVolatile = TRUE;
nRet = m_pLEADDicomDS->MoveFirstElement (FALSE);
while(nRet == 0)
{
pCurrentElement = m_pLEADDicomDS->GetCurrentElement();
csItem.Format("%X", pCurrentElement->GetTag());
m_List1.AddString(csItem);
nRet = m_pLEADDicomDS->MoveNextElement (FALSE);
}
csItem.Format("Element Count = %ld", m_List1.GetCount());
AfxMessageBox(csItem);
//list only non-volatile elements
m_pLEADDicomDS->IncludeVolatile = FALSE;
nRet = m_pLEADDicomDS->MoveFirstElement (FALSE);
while(nRet == 0)
{
pCurrentElement = m_pLEADDicomDS->GetCurrentElement();
csItem.Format("%X", pCurrentElement->GetTag());
m_List2.AddString(csItem);
nRet = m_pLEADDicomDS->MoveNextElement (FALSE);
}
csItem.Format("Non-Volatile Element Count = %ld", m_List2.GetCount());
AfxMessageBox(csItem);