#if !defined(AFX_RADIOBROWSESEARCHDLG_H__CC7C5C6E_E693_4504_8402_0FD3479F3FB2__INCLUDED_)
#define AFX_RADIOBROWSESEARCHDLG_H__CC7C5C6E_E693_4504_8402_0FD3479F3FB2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// RadioBrowseSearchDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CRbSearchDlg dialog

class CRbSearchDlg : public CDialog
{
// Construction
public:
	CRbSearchDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CRbSearchDlg)
	enum { IDD = IDD_RB_SEARCH_DLG };
	CComboBox	m_ctrlLanguageCodeCombo;
	CComboBox	m_ctrlCountryCodeCombo;
	CComboBox	m_ctrlStatesCombo;
	CComboBox	m_ctrlTagCombo;
	CListCtrl	m_ctrlResultsList;
	CListBox	m_ctrlTagList;
	CEdit		m_ctrlMinVotesEdit;
	CEdit		m_ctrlMinClicksEdit;
	CEdit		m_ctrlMaxRestultsEdit;
	CEdit		m_ctrlTopicEdit;
	CStatic		m_ctrlResultsStatic;
	CString	m_countryCodeStr;
	CString	m_languageCodeStr;
	CString	m_stateStr;
	CString	m_nameStr;
	CString	m_topicStr;
	int		m_iMinimumClicks;
	int		m_iMinimumVotes;
	int		m_iMaxResults;
	//}}AFX_DATA

	// Set by caller.
	CDsLavDoc * m_pDoc;

	// Tag List
	void SetTagsList();
	CStringArray m_tagListAr;
	void OnContextMenuTagList(CWnd* pWnd, CPoint point);

	// Tag Combo.
	void SetTagCombo();

	// Country Combo.
	void SetCountryCodeCombo();

	// States Combo.
	void SetStatesCombo();

	// Language Combo.
	void SetLanguageCodeCombo();

	// Results List.
	BOOL bSortAscend;
	void FillResultsList();
	void OnContextMenuResultsList(CWnd* pWnd, CPoint point);

	// Helpers.
	BOOL GetCountryCodeCode(const CString & name, CString & code);
	BOOL GetLanguageCodeCode(const CString & name, CString & code);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRbSearchDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CRbSearchDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnKillfocusRbTagList();
	afx_msg void OnSelchangeTagCombo();
	afx_msg void OnSelchangeCountryCodeCombo();
	afx_msg void OnClearCriterea();
	afx_msg void OnSearch();
	afx_msg void OnColumnclickResultsList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnClearRsltsButton();
	afx_msg void OnClickResultsList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnImportButton();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
	afx_msg void OnKillfocusMaxRsltsEdit();
	afx_msg void OnKillfocusClicksEdit();
	afx_msg void OnKillfocusVotesEdit();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	// Resizing Dlg
	int		m_nOrigHeight;
	int		m_nCurHeight;
	int		m_nScrollPos;
	CRect	m_rect; 
};


/////////////////////////////////////////////////////////////////////////////
// CRbTagDlg dialog

class CRbTagDlg : public CDialog
{
// Construction
public:
	CRbTagDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CRbTagDlg)
	enum { IDD = IDD_RB_TAG_DLG };
	CEdit	m_ctrlTagEdit;
	CString	m_strTag;
	//}}AFX_DATA

	// Set by caller.
	CString m_dlgTitle;


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRbTagDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CRbTagDlg)
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_RADIOBROWSESEARCHDLG_H__CC7C5C6E_E693_4504_8402_0FD3479F3FB2__INCLUDED_)
