#if !defined(AFX_SPRAVFILTERPROPDLG_H__C987578D_BF81_4164_B221_E1D63B5DD489__INCLUDED_)
#define AFX_SPRAVFILTERPROPDLG_H__C987578D_BF81_4164_B221_E1D63B5DD489__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SpravFilterPropDlg.h : header file
//
#include <apl_gui.h>
#include "apl_api.h"
#include "ResizableDialog.h"
#include "FindQueryDlg.h"

struct SFilterData
{
	SFilterData(CaplInstance *_charact,CaplInstance *_unit,CaplInstance *_type,ElValChar* _el_ch){
		charact=_charact;unit=_unit;type=_type;el_ch=_el_ch;//valid=false;
	}
	CaplInstance *charact;
	CaplInstance *unit;
	CaplInstance *type;
	ElValChar* el_ch;
//	bool valid;
};



/////////////////////////////////////////////////////////////////////////////
// CSpravFilterPropDlg dialog

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

	void FillTableCharact();
	void FillTableAdjust();
	void Edit(int row,int col);
	bool TestEdited();
	bool TestEditedInternal();

	CaplAPI* m_api;
	TArrElValChar m_list_char;
	aplExtent *m_all_char;
	int m_sel_row;
	int m_edit_row;
	int m_edit_col;
	bool m_edited;
	CImageList m_ImageList;// реально картинок нет - но этот лист нуже чтобы высота строк была побольше
	
	CaplTAggr<SFilterData*,SFilterData*,APLAGGR_AUTOKILLREF> m_list_filter_data;

// Dialog Data
	//{{AFX_DATA(CSpravFilterPropDlg)
	enum { IDD = IDD_SPRAV_FILTER_PROP_DIALOG };
	CDateTimeCtrl	m_DateTime;
	CComboBox	m_Combo;
	CEdit	m_Edit;
	CListCtrl	m_ListAdjust;
	CaplButton	m_BtnOk;
	CaplButton	m_BtnCancel;
	//}}AFX_DATA


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

// Implementation
protected:

	bool m_is_load_bmp;
	CImageList imagelist_but;

	// Generated message map functions
	//{{AFX_MSG(CSpravFilterPropDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnRclickListAdjust(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDblclkListAdjust(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnClickListAdjust(NMHDR* pNMHDR, LRESULT* pResult);
	virtual void OnOK();
	afx_msg void OnSetfocusListAdjust(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnKeydownListAdjust(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SPRAVFILTERPROPDLG_H__C987578D_BF81_4164_B221_E1D63B5DD489__INCLUDED_)
