#if !defined(AFX_COMPAREFOLDERSDLG_H__267AA38D_C66F_4301_9FE4_C7086808017A__INCLUDED_)
#define AFX_COMPAREFOLDERSDLG_H__267AA38D_C66F_4301_9FE4_C7086808017A__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CCompareFoldersDlg dialog
#include "resource.h"
#include "apl_api.h"	// Added by ClassView
#include "apl_gui.h"	// Added by ClassView
#include "aplListCtrl.h"
#include "ResizableDialog.h"

class CCompareFoldersDlg : public CResizableDialog
{
// Construction
public:
	bool FindFiles(CString filter, UINT type,CStringArray *array);
	int RecCompareDocs(CaplInstance *doc, CStringArray *files, int level, int oldlevel, CString path, CaplInstance *folder);
	CMap<DWORD, DWORD, CString, CString> *m_folder_map;
	CItem* FindItem(CaplInstance *inst);
	static CString GetDocFileName(CaplInstance *inst, CaplAPI * m_api);
	CString GetDocFileName(CaplInstance *inst);
	bool m_folder_rec;
	bool m_doc_rec;
	void GetDocs(CaplInstance *inst, aplExtent &docs);
	void LoadDirectory(CaplInstance *folder, CString path, int level = 0);
	CaplAPI *m_api;
	CString m_path;
	CaplInstance *m_folder;
	CCompareFoldersDlg(CWnd* pParent = NULL);   // standard constructor

	BOOL m_psm_show;
	BOOL m_disk_show;
	BOOL m_dif_show;
	BOOL m_compare_show;
protected:
// Dialog Data
	//{{AFX_DATA(CCompareFoldersDlg)
	enum { IDD = IDD_SS_COMPARE_FOLDERS };
	CaplButton	m_print;
	CButton	m_legenda;
	CaplButton	m_undo_btn;
	CaplButton	m_refresh_btn;
	CaplButton	m_adddoc_btn;
	CaplButton	m_lver_btn;
	CaplButton	m_cout_btn;
	CaplButton	m_cin_btn;
	CaplButton	m_ok_btn;
	CaplCompareFolderListCtrl	m_psm_list;
	//}}AFX_DATA

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

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CCompareFoldersDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg void OnCheckout();
	afx_msg void OnCheckin();
	afx_msg void OnGetlastver();
	afx_msg void OnAdddoc();
	afx_msg void OnRefresh();
	afx_msg void OnItemchangedSsCfdListpsm(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnUndoCheckout();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnRclickSsCfdListpsm(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnSourcesafeView();
	afx_msg void OnSourcesafeViewDoc();
	afx_msg void OnSsPrintDocs();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_COMPAREFOLDERSDLG_H__267AA38D_C66F_4301_9FE4_C7086808017A__INCLUDED_)
