CreateAssociate Example for C++ 6.0 and later
void CMFCdicomDlg::OnButton1()
{
//create the Associate Class as Request
m_pLEADDicomNet->CreateAssociate(TRUE);
//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate(m_pLEADDicomNet->GethPDU());
//Get presentations here
if (m_pLEADDicomNet->IsRequest(m_pLEADDicomNet->GethPDU()))
AfxMessageBox ("Associate Request? TRUE");
else
AfxMessageBox ("Associate Request? FALSE");
//reset the Associate class to Accept
m_pLEADDicomNet->ResetAssociate(m_pLEADDicomNet->GethPDU(), FALSE);
//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate(m_pLEADDicomNet->GethPDU());
if (m_pLEADDicomNet->IsRequest (m_pLEADDicomNet->GethPDU()))
AfxMessageBox ("Associate Request? TRUE");
else
AfxMessageBox ("Associate Request? FALSE");
//free the Associate class
m_pLEADDicomNet->FreeAssociate( m_pLEADDicomNet->GethPDU());
}