NetReceiveCCancelRequest Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCCancelRequest (long hNet, short nPresentationID, short nMessageID) 
{
   CString strMsg;
   
   //This sample receives the cancel request, but does not actually perform the cancel
   _bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
   strMsg.Format("*** OnNetReceiveCCancelRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\n", 
      (char *)strPeerAddress,
      nPresentationID, 
      nMessageID 
      );
   AfxMessageBox(strMsg);
}