/* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. */

#pragma once
#include "afxwin.h"

// SearchDicomDlg dialog

class SearchDicomDlg : public CDialog
{
	DECLARE_DYNAMIC(SearchDicomDlg)

public:
	// Search any DICOM in bdb.
	SearchDicomDlg(DB_ENV *env, DICOM_DBS dm_dbs, CWnd* pParent = NULL);   
	virtual ~SearchDicomDlg();
	BOOL SearchDicomDlg::OnInitDialog();

// Dialog Data
	enum { IDD = IDD_SEARCH_DICOM };

protected:
	virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

	DECLARE_MESSAGE_MAP()
private:
	DB_ENV *m_env;            // bdb environment handle.
	CString m_selValue[ATTRIBUTENUM];  
	                          // String array of all attributes to query
	DICOM_DBS m_dbs;          // bdb database handles.
	BOOL m_selAtt[ATTRIBUTENUM];        
	                          // Boolean array of all attributes whether
				  // selected or not.
	
public:
	CComboBox pComboAttribute;// Combo box to select/input attributes.
	CComboBox pComboValue;    // Combo box to select/input value.
	CEdit pEditQuery;         // Edit box to show the complete query.
	
	// Change content in the combo box of attribute name. This is 
	// happened when any item in its list is clicked or any attribute
	// name is input into the combo box.
	afx_msg void OnCbnSelchangeComboAttributes();
	
	// Change content in the combo box of attribute value. This is 
	// happened when any item in its list is clicked or any attribute
	// value is input into the combo box. 
	afx_msg void OnBnClickedButtonAdd();
	
	// Click on the resume button.
	afx_msg void OnBnClickedButtonResume();
	
	// Click on the search button.
	afx_msg void OnBnClickedButtonSearch();
};
