#ifndef _DIRECTORYDIALOG_H 
#define _DIRECTORYDIALOG_H 
 
enum Flag{SD_DIR=1,SD_DIR_FILE=3}; 
 
class  CDirectoryDialog   
{	 
public: 
	CDirectoryDialog(); 
	CDirectoryDialog(CString strIniKeyName); 
	virtual ~CDirectoryDialog(); 
	 
	CString ShowDirectoryTree(CWnd *pBuddyWnd);
	CString ShowDirectoryTree(CString strIniDir="");
 
	void SetDefaultDirectory(CString strDefaultDirectory); 
	CString GetDefaultDirectory(); 
		 
	HWND		m_hwndOwner;      
    CString		m_strTitle;  
    enum Flag	m_ulFlags;  
    	 
	CString m_strIniAppName ; 
	CString m_strIniKeyName ; 
			 
private: 
	void init();
	static CString GetShortDir(CString strDir,long nMaxLength =45);
	UINT GetStyle(enum Flag flag);
	CString GetDefaultTitle();
	 
	static int CALLBACK  BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData); 
}; 
 
#endif _DIRECTORYDIALOG_H