Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.1 KiB

  1. // FolderDialog.h: interface for the CFolderDialog class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_FOLDERDIALOG_H__7C3137EF_7248_477F_ABEA_85F33AB2E0EF__INCLUDED_)
  5. #define AFX_FOLDERDIALOG_H__7C3137EF_7248_477F_ABEA_85F33AB2E0EF__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CFolderDialog
  10. {
  11. public:
  12. CFolderDialog() :
  13. m_dwLastError(ERROR_SUCCESS)
  14. {
  15. m_tszInitialDir[0] = TEXT('\0');
  16. m_tszSelectedDir[0] = TEXT('\0');
  17. }
  18. virtual ~CFolderDialog() {}
  19. DWORD Init(LPCTSTR tszInitialDir=NULL, UINT nTitleResId=0);
  20. UINT DoModal(DWORD dwFlags = 0);
  21. TCHAR* GetSelectedFolder() {return m_tszSelectedDir; }
  22. DWORD GetLastError() { return m_dwLastError; }
  23. private:
  24. TCHAR m_tszInitialDir[MAX_PATH+1];
  25. TCHAR m_tszSelectedDir[MAX_PATH+1];
  26. CString m_cstrTitle;
  27. DWORD m_dwLastError;
  28. static int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData);
  29. };
  30. #endif // !defined(AFX_FOLDERDIALOG_H__7C3137EF_7248_477F_ABEA_85F33AB2E0EF__INCLUDED_)