Source code of Windows XP (NT5)
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.

66 lines
1.7 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: FileDlg.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //-----------------------------------------------------------------------------
  8. #if !defined(__FileDlg_h__)
  9. #define __FileDlg_h__
  10. #pragma warning(disable : 4275)
  11. class LTAPIENTRY CLFileDialog : public CFileDialog
  12. {
  13. DECLARE_DYNAMIC(CLFileDialog)
  14. public:
  15. CLFileDialog(
  16. BOOL bOpenFileDialog = TRUE, // TRUE for FileOpen, FALSE for FileSaveAs
  17. LPCTSTR lpszDefExt = NULL,
  18. LPCTSTR lpszFileName = NULL,
  19. DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
  20. LPCTSTR lpszFilter = NULL,
  21. CWnd* pParentWnd = NULL,
  22. LPCTSTR pszTitle = NULL);
  23. // Operations
  24. public:
  25. CString GetFileFilter();
  26. virtual int DoModal();
  27. // Attributes
  28. public:
  29. virtual void SetOkButtonText(TCHAR const * const szOkText);
  30. virtual void SetOkButtonText(HINSTANCE const hResourceDll,
  31. UINT const uStringId);
  32. virtual void SetCancelButtonText(TCHAR const * const szCancelText);
  33. virtual void SetCancelButtonText(HINSTANCE const hResourceDll,
  34. UINT const uStringId);
  35. virtual void SetCheckIfBufferTooSmall(BOOL const bCheckIfBufferTooSmall);
  36. // Data
  37. protected:
  38. CLString m_strOkButton; // new OK button text for dialog
  39. CLString m_strCancelButton; // new Cancel button text for dialog
  40. BOOL m_bCheckIfBufferTooSmall; // should DoModal() checks condition?
  41. // Implementation
  42. protected:
  43. //{{AFX_MSG(CProjectOpenDlg)
  44. virtual BOOL OnInitDialog();
  45. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  46. //}}AFX_MSG
  47. DECLARE_MESSAGE_MAP()
  48. // Implementation
  49. protected:
  50. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT * pResult);
  51. };
  52. #pragma warning(default : 4275)
  53. #endif