#pragma once
#include <afxcmn.h>

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

#define TIMER_ID 123

// CDlg4Log dialog

extern long dict_update_runned;

class CDlg4Log : public CaplResizableDialog
{
	DECLARE_DYNAMIC(CDlg4Log)

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

	void LogMessage(LPCTSTR message);
	HANDLE m_event_run;
	
	CRITICAL_SECTION m_protect_log;
	CString m_new_mess;

// Dialog Data
	enum { IDD = IDD_DLG_4_LOG };

	CaplNetStepData *m_data;
	CString	m_StrOutput;
	bool m_autostart;

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

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


	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedCancel();
	afx_msg void OnBnClickedBtnSave();
	afx_msg void OnBnClickedBtnRun();
	afx_msg void OnBnClickedClear();
	afx_msg void OnBnClickedBtnSelectDict();
	afx_msg void OnTimer(UINT_PTR nIDEvent);

	CString m_Path2NewDict;
// 	CRichEditCtrl m_CtrlOutput;
	CEdit m_CtrlOutput;
	virtual BOOL OnInitDialog();
	CButton m_BtnRun;
	CEdit m_CtrlPath2Dict;
	CButton m_BtnSelectDict;
	CButton m_CtrlCancel;
};
