#pragma once

#include <apl_gui.h>
#include "aplNetStepData.h"
#include "resource.h"
#include <afxwin.h>

// CDlgAttrsHistory dialog

class CDlgAttrsHistory : public CaplResizableDialog
{
	DECLARE_DYNAMIC(CDlgAttrsHistory)

public:
	CDlgAttrsHistory(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlgAttrsHistory();

// Dialog Data
	enum { IDD = IDD_DLG_ATTRS_HISTORY };

	CaplButton	m_ok_btn;
	CaplButton m_CtrlBtnApply;
	CaplButton m_CtrlBtnFile;

	COleDateTime m_DateBeg1;
// 	COleDateTime m_DateBeg2;
	COleDateTime m_DateEnd1;
// 	COleDateTime m_DateEnd2;

	CComboBox m_CmbxSelectEntity;
	CComboBox m_CmbxSelectUser;

	BOOL m_IsUsr;
	BOOL m_IsEnt;
	BOOL m_IsBeg;
	BOOL m_IsEnd;

	CDateTimeCtrl m_CtrlDateTimeBeg1;
// 	CDateTimeCtrl m_CtrlDateTimeBeg2;
	CDateTimeCtrl m_CtrlDateTimeEnd1;
// 	CDateTimeCtrl m_CtrlDateTimeEnd2;
	
	CStatic m_CtrlStUser;
	CButton m_CtrlBtnBeg;
	CButton m_CtrlBtnEnd;
	CStatic m_CtrlStBeg1;
	CStatic m_CtrlStEnd1;

	CSortListCtrl m_ListAttrsVal;

	CaplNetStepData *m_data;

	void ProcessContextMenu(NMHDR* pNMHDR);
	bool MakeAttrsHistory();
	CString m_def_file_name;

	CaplInstance* m_user;
	CaplInstance* m_admin;



protected:
	// предотвращаем потерю модальности после диалога с бочками из aplSocketTransport
	CaplParentWndProcesser m_pwp;

	HICON m_hIcon;


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

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
	afx_msg void OnBnClickedCheckBeg();
	afx_msg void OnBnClickedCheckEnd();
	afx_msg void OnBnClickedCheckUser();
	afx_msg void OnBnClickedSaveToFile();
	afx_msg void OnRclickListObjects(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnBnClickedApply();
	CString m_StrAbout;
};
