#if !defined(AFX_DLGQLLANG_H__AD813978_0FFB_4C60_A827_0CB49F568ECF__INCLUDED_)
#define AFX_DLGQLLANG_H__AD813978_0FFB_4C60_A827_0CB49F568ECF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgQlLang.h : header file
//
#include "aplQLQueryParse.h"
#include "resource.h"
#include <apl_gui.h>
#include "DlgSelectEntityAttrs.h"


#define IDC_STATUS_BAR 10001

/////////////////////////////////////////////////////////////////////////////
// CDlgQlLang dialog

class CDlgQlLang : public CaplResizableDialog
{
// Construction
public:
	CDlgQlLang(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlgQlLang();
	virtual BOOL PreTranslateMessage(MSG* pMsg);

	CaplQLQueryParse query;
	CaplNetStepData* m_hStepData;
	bool m_is_parsed;
	bool m_is_ro;
	bool m_only_ro;
	bool m_can_save2bd;
// Dialog Data
	//{{AFX_DATA(CDlgQlLang)
	enum { IDD = IDD_DLG_QL_LANG };
	CButton	m_ChkMakeTable;
	CButton	m_ChkSave2BD;
	CEdit	m_EditQueryName;
	CStatic	m_StName;
	CButton	m_btn_edit;
	CButton	m_btn_help_lang;
	CButton	m_btn_run;
	CButton	m_btn_cancel;
	CButton	m_btn_save;
	CButton	m_btn_load;
	CButton	m_btn_cut;
	CButton	m_btn_copy;
	CButton	m_btn_paste;
	CRichEditCtrl	m_StatusQlLang;
	CRichEditCtrl	m_EdtQlLang;
	CString	m_lng_query;
	CString	m_NameQuery;
	BOOL	m_IsSave2BD;
	BOOL	m_IsMakeTable;
	//}}AFX_DATA

	void ReplaceSel(CString &text);
	void GetSel(CString &str);

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

	CDlgSelectEntityAttrs m_dlg_selectEA;

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

	CStatusBarCtrl m_statusbar;
	void SetState();
	void SelectInsertEntAttr();
	CHARFORMAT m_cf;

	// Generated message map functions
	//{{AFX_MSG(CDlgQlLang)
	afx_msg void OnBtnLoadFfile();
	virtual void OnOK();
	virtual void OnRun();
	virtual BOOL OnInitDialog();
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnCancelMode();
	afx_msg void OnSelchangeEdtQlLang(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnBtnSaveFfile();
	afx_msg void OnHelpLang();
	afx_msg void OnEdit();
	afx_msg void OnBtnCopy();
	afx_msg void OnBtnPaste();
	afx_msg void OnBtnCut();
	afx_msg void OnCheckSave2bd();
	//}}AFX_MSG
	//BOOL OnToolTipShow( UINT id, NMHDR * pNMHDR, LRESULT * pResult ); ЯАИ:  Перенесено в CaplTranslateDialog
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
};

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

#endif // !defined(AFX_DLGQLLANG_H__AD813978_0FFB_4C60_A827_0CB49F568ECF__INCLUDED_)
