#if !defined(AFX_DLGLISTINSTANCES_H__0129A650_3219_4AF3_83E8_E2897897DFD7__INCLUDED_)
#define AFX_DLGLISTINSTANCES_H__0129A650_3219_4AF3_83E8_E2897897DFD7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgListInstances.h : header file
//
#include "apl_gui.h"
#include "apl_api.h"

//#include "ResizableDialog.h"
#include "InstPropertyCtrl.h"

#define ID_MOVE2TREE 100

/////////////////////////////////////////////////////////////////////////////
// CDlgListInstances dialog

class CDlgListInstances : public CaplResizableDialog
{
	/*
	struct S_pi{
		S_pi(CaplInstance* in_pi){pi=in_pi;}
		CaplInstance* pi;
		aplExtent list_bpi;
	};
	
	struct S_pdf{
		CaplInstance* pdf;
		CaplTAggr<S_pi*,S_pi*,APLAGGR_AUTOKILLREF> list_pi;
	};
	*/
	// Construction
public:
	CDlgListInstances(CWnd* pParent = NULL);   // standard constructor
	
	// Dialog Data
	//{{AFX_DATA(CDlgListInstances)
	enum { IDD = IDD_DLG_LIST_INSTANCES };
	CaplButton	m_BtnMove2Tree;
	CaplButton	m_BtnCancel;
	CaplButton	m_BtnSaveToFile;
	CaplButton	m_BtnSelectChsrscteristic;
	CaplButton	m_BtnSelectColumns;
	CInstPropertyCtrl	m_ListObjects;
	CEdit	m_CountString;
	//}}AFX_DATA
	aplExtent* m_content;
	CaplAPI *m_api;
	CaplInstance* m_base_inst;
	CaplEntity* m_main_type;

	
//	bool CreateColumns();
//	bool FeelTables();
	bool FeelTableCtrl();	

	bool m_is_hide_move_button;
	bool m_can_delete;
	bool m_changed;
	bool m_mode_niiao;
	CString m_delete_message;
	CString m_delete_message_all;
	CString m_delete_message_from_BD;
	bool m_is_context_menu_categ;
	
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDlgListInstances)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	int m_CountALlString;
//	CaplTAggr<SEntColumnsMask*,SEntColumnsMask*,APLAGGR_LIST_OR_AUTOKILLREF> m_Mask;
	CaplTAggr<SItemColumnData*,SItemColumnData*,APLAGGR_LIST_OR_AUTOKILLREF> m_Items;
	
	// предотвращаем потерю модальности после диалога с бочками из aplSocketTransport
	CaplParentWndProcesser m_pwp;
	
	// Generated message map functions
	//{{AFX_MSG(CDlgListInstances)
	virtual BOOL OnInitDialog();
	afx_msg void OnRclickListObjects(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnClickListObjects(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDblclickListObjects(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnSaveToFile();
	afx_msg void OnMove2Tree();
	virtual void OnCancel();
	afx_msg void OnSelectCharacterysticSet();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnBtnSelectColumn();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_DLGLISTINSTANCES_H__0129A650_3219_4AF3_83E8_E2897897DFD7__INCLUDED_)

