// SPStrDlg.cpp : implementation file // #include "stdafx.h" #include "cldprn32.h" #include "SPStrDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CStoredPrintStorageDlg dialog CStoredPrintStorageDlg::CStoredPrintStorageDlg(CWnd* pParent /*=NULL*/) : CDialog(CStoredPrintStorageDlg::IDD, pParent) { //{{AFX_DATA_INIT(CStoredPrintStorageDlg) m_sRetrieveAETitle = _T(""); m_sRefSOPInstanceUID = _T(""); m_sStudyInstanceUID = _T(""); m_sSeriesInstanceUID = _T(""); m_sPatientID = _T(""); //}}AFX_DATA_INIT } void CStoredPrintStorageDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CStoredPrintStorageDlg) DDX_Text(pDX, IDC_EDIT_RETRIEVEAETITLE, m_sRetrieveAETitle); DDX_Text(pDX, IDC_EDIT_REFERENCEDSOPINSTANCEUID, m_sRefSOPInstanceUID); DDX_Text(pDX, IDC_EDIT_STUDYINSTANCEUID, m_sStudyInstanceUID); DDX_Text(pDX, IDC_EDIT_SERIESINSTANCEUID, m_sSeriesInstanceUID); DDX_Text(pDX, IDC_EDIT_PATIENTID, m_sPatientID); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CStoredPrintStorageDlg, CDialog) //{{AFX_MSG_MAP(CStoredPrintStorageDlg) ON_EN_CHANGE(IDC_EDIT_RETRIEVEAETITLE, OnChangeEditRetrieveAETitle) ON_EN_CHANGE(IDC_EDIT_REFERENCEDSOPINSTANCEUID, OnChangeEditReferencedSOPInstanceUID) ON_EN_CHANGE(IDC_EDIT_STUDYINSTANCEUID, OnChangeEditStudyInstanceUID) ON_EN_CHANGE(IDC_EDIT_SERIESINSTANCEUID, OnChangeEditSeriesInstanceUID) //}}AFX_MSG_MAP END_MESSAGE_MAP() void CStoredPrintStorageDlg::UpdateButtonOKStatus() { UpdateData(); m_sRetrieveAETitle.TrimLeft(); m_sRefSOPInstanceUID.TrimLeft(); m_sStudyInstanceUID.TrimLeft(); m_sSeriesInstanceUID.TrimLeft(); GetDlgItem(IDOK)->EnableWindow(m_sRetrieveAETitle.GetLength() && m_sRefSOPInstanceUID.GetLength() && m_sStudyInstanceUID.GetLength() && m_sSeriesInstanceUID.GetLength()); } ///////////////////////////////////////////////////////////////////////////// // CStoredPrintStorageDlg message handlers BOOL CStoredPrintStorageDlg::OnInitDialog() { CDialog::OnInitDialog(); UpdateButtonOKStatus(); return TRUE; } void CStoredPrintStorageDlg::OnChangeEditRetrieveAETitle() { UpdateButtonOKStatus(); } void CStoredPrintStorageDlg::OnChangeEditReferencedSOPInstanceUID() { UpdateButtonOKStatus(); } void CStoredPrintStorageDlg::OnChangeEditStudyInstanceUID() { UpdateButtonOKStatus(); } void CStoredPrintStorageDlg::OnChangeEditSeriesInstanceUID() { UpdateButtonOKStatus(); }