SetCommandSet Example for C++ 6.0 and later
void CDicomNetSink::OnNetReceiveData(long hNet, short nID, long hDicomCS, long hDicomDS)
{
short nRet;
CString szOut;
//we have received a data message
//copy the Command Set so we can examine its elements
m_pDlg->m_pLEADDicomDS->SetCommandSet (hDicomCS);
nRet = m_pDlg->m_pLEADDicomDS->FindFirstElement (TAG_COMMAND_FIELD, FALSE);
nRet = m_pDlg->m_pLEADDicomDS->GetShortValue (0, 1);
szOut.Format("Command Field = %04X", m_pDlg->m_pLEADDicomDS->GetShortValues(0));
AfxMessageBox(szOut);
}