#if !defined(AFX_SELECTINSTANCEDLGEX_H__93AAF3F9_EFE6_4E28_AF45_40D9954F91D2__INCLUDED_)
#define AFX_SELECTINSTANCEDLGEX_H__93AAF3F9_EFE6_4E28_AF45_40D9954F91D2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SelectInstanceDlgEx.h : header file
//

#include "resource.h"
#include "apl_gui.h"
#include "apl_api.h"

class CSelectInstanceFrame;
class CSelectInstanceView;

/////////////////////////////////////////////////////////////////////////////
// CSelectInstanceDlgEx dialog

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

// Dialog Data
	//{{AFX_DATA(CSelectInstanceDlgEx)
	enum { IDD = IDD_NEW_SELECT_INSTANCE_DIALOG };
	CStatic	m_frameWnd;
	CaplButton	m_cancelBtn;
	CaplButton	m_okBtn;
	//}}AFX_DATA

	CaplAPI* m_api;
	CSelectInstanceFrame* m_pFrame;
	CSelectInstanceView* m_pView;

	fnValidateInst m_fn;
	fnValidateInst2 m_fn2;
	DWORD m_data;
	aplExtent m_SelectedInstances;
	aplExtent *m_BaseItems;
	CaplTAggr <CaplOldSelInstItem*,CaplOldSelInstItem*,
			APLAGGR_UNIQUE|APLAGGR_LIST|APLAGGR_AUTOKILLREF> *m_oldOpenedItems;
	
	CString m_sTitle;
	long	m_mode;

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

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

// Implementation
public:
	// Generated message map functions
	//{{AFX_MSG(CSelectInstanceDlgEx)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	virtual void OnCancel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_SELECTINSTANCEDLGEX_H__93AAF3F9_EFE6_4E28_AF45_40D9954F91D2__INCLUDED_)
