ConformanceStatus example for C++ 6.0 and later
short nRet;
nRet = m_pLEADDicomDS->ConformanceTestDS();
if(nRet)
AfxMessageBox("Error");
void CDicomDSSink::OnConformanceStatus(short nFlags)
{
CString msg;
short nRet;
CString szTag;
CString szOut;
IDicomDSElementPtr pCurrentElement=NULL;
//display info about non-standard element
switch(nFlags)
{
case CALLBACK_ERROR_UNKNOWN_CLASS:
msg = "Unknown Class";
break;
case CALLBACK_ERROR_UNKNOWN_TAG:
msg = "Unknown Tag";
break;
case CALLBACK_ERROR_UNKNOWN_VR:
msg = "Unknown VR";
break;
case CALLBACK_ERROR_WRONG_VR:
msg = "Error in VR";
break;
case CALLBACK_ERROR_MIN_VM:
msg = "Error in MinVM";
break;
case CALLBACK_ERROR_MAX_VM:
msg = "Error in MaxVM";
break;
case CALLBACK_ERROR_DIVIDE_VM:
msg = "Error in DivideVM";
break;
case CALLBACK_ERROR_IMAGE:
msg = "Error in Image";
break;
default:
return;
}
pCurrentElement = m_pDlg->m_pLEADDicomDS->GetCurrentElement();
szTag.Format("%04X:%04X", GETGROUP(pCurrentElement->GetTag()),
GETELEMENT(pCurrentElement->GetTag()));
szOut.Format("%s\nTag: %s", msg, szTag);
nRet = ::MessageBox(NULL, szOut, "Non-Standard Element", MB_OKCANCEL);
if(nRet == IDCANCEL)
m_pDlg->m_pLEADDicomDS->EnableConformanceStatus = FALSE;
return;
}