#if !defined(AFX_HARDCOPYDLG_H__6CD4C06D_DBEB_4137_B0FC_7BDC1BE96EB0__INCLUDED_)
#define AFX_HARDCOPYDLG_H__6CD4C06D_DBEB_4137_B0FC_7BDC1BE96EB0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// HardCopyDlg.h : header file
//
#include "resource.h"
#include <apl_gui.h>
#include "apl_api.h"
/////////////////////////////////////////////////////////////////////////////
// CHardCopyDlg dialog

class CHardCopyDlg : public CaplResizableDialog
{
// Construction
public:
	bool SaveChanges();
	CHardCopyDlg(CWnd* pParent = NULL);   // standard constructor

	CaplInstance *m_doc;
	CaplInstance *m_doc_copy;
	CaplInstance *m_owner;
	CaplInstance *m_place_of_use;
	CaplInstance *m_doc_act_ver;
	CaplInstance *m_doc_cur_ver;
	CaplAPI *m_api;
	CaplInstance *m_cur_person;
	CaplInstance *m_act_doc_change;
	CaplInstance *m_cur_doc_change;
	CaplInstance *m_doc_copy_rev_change;
	CaplInstance *m_doc_copy_owner_change;
// Dialog Data
	//{{AFX_DATA(CHardCopyDlg)
	enum { IDD = IDD_HARDCOPYDLG_DIALOG };
	CEdit	m_act_ver_id_ctrl;
	CStatic	m_doc_text_ctrl;
	CStatic	m_act_ver_text_ctrl;
	CEdit	m_act_change_name_ctrl;
	CComboBox	m_state_ctrl;
	CStatic	m_basis_text_ctrl;
	CEdit	m_place_of_use_name_ctrl;
	CStatic	m_place_of_use_text_ctrl;
	CStatic	m_owner_name_text_ctrl;
	CEdit	m_owner_name_ctrl;
	CEdit	m_copy_basis_ctrl;
	CButton	m_owner_frame_ctrl;
	CButton	m_owners_history_btn;
	CButton	m_copy_act_frame_ctrl;
	CButton	m_changes_history_btn;
	CStatic	m_changes_date_text_ctrl;
	CDateTimeCtrl	m_changes_date_ctrl;
	CButton	m_change_owner_btn;
	CDateTimeCtrl	m_issue_date_ctrl;
	CaplButton	m_mark_changed_btn;
	CaplButton	m_ok_btn;
	CaplButton	m_cancel_btn;
	CaplButton	m_view_cur_ver_btn;
	CaplButton	m_view_act_ver_btn;
	CStatic	m_update_date_text_ctrl;
	CDateTimeCtrl	m_update_date_ctrl;
	CButton	m_select_place_of_use_btn;
	CButton	m_select_owner_btn;
	CButton	m_select_doc_btn;
	CEdit	m_cur_ver_id_ctrl;
	CStatic	m_cur_ver_text_ctrl;
	CEdit	m_cur_change_name_ctrl;
	CStatic	m_cur_change_text_ctrl;
	CString	m_act_change_name;
	CString	m_copy_basis;
	CString	m_copy_id;
	CString	m_cur_change_name;
	CString	m_cur_ver_id;
	CString	m_doc_name;
	COleDateTime	m_issue_date;
	CString	m_owner_name;
	CString	m_place_of_use_name;
	COleDateTime	m_update_date;
	COleDateTime	m_changes_date;
	int		m_state;
	CString	m_act_ver_id;
	//}}AFX_DATA


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

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

	void RefreshDocInfo();
	void RefreshOwnerInfo();
	void RefreshPlaceOfUseInfo();
	void SetFromInst();
	// Generated message map functions
	//{{AFX_MSG(CHardCopyDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSelectDocBtn();
	afx_msg void OnSelectOwnerBtn();
	afx_msg void OnSelectPlaceOfUseBtn();
	virtual void OnOK();
	afx_msg void OnViewCurVerBtn();
	afx_msg void OnMarkChangedBtn();
	afx_msg void OnChangeOwnerBtn();
	afx_msg void OnChangesHistoryBtn();
	afx_msg void OnOwnersHistoryBtn();
	afx_msg void OnViewActVerBtn();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_HARDCOPYDLG_H__6CD4C06D_DBEB_4137_B0FC_7BDC1BE96EB0__INCLUDED_)
