RestrictedFileDialog.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #if !defined(AFX_RESTRICTEDFILEDIALOG_H__C461432A_D7EE_11D2_A00A_00104B791122__INCLUDED_)
  19. #define AFX_RESTRICTEDFILEDIALOG_H__C461432A_D7EE_11D2_A00A_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // RestrictedFileDialog.h : header file
  24. //
  25. /////////////////////////////////////////////////////////////////////////////
  26. // RestrictedFileDialogClass dialog
  27. class RestrictedFileDialogClass : public CFileDialog
  28. {
  29. DECLARE_DYNAMIC(RestrictedFileDialogClass)
  30. public:
  31. RestrictedFileDialogClass(BOOL bOpenFileDialog, // TRUE for FileOpen, FALSE for FileSaveAs
  32. LPCTSTR lpszDefExt = NULL,
  33. LPCTSTR lpszFileName = NULL,
  34. DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
  35. LPCTSTR lpszFilter = NULL,
  36. CWnd* pParentWnd = NULL);
  37. protected:
  38. //{{AFX_MSG(RestrictedFileDialogClass)
  39. // NOTE - the ClassWizard will add and remove member functions here.
  40. //}}AFX_MSG
  41. DECLARE_MESSAGE_MAP()
  42. virtual void OnFileNameChange (void);
  43. virtual BOOL OnFileNameOK (void);
  44. virtual void OnInitDone (void);
  45. private:
  46. CString m_ExpectedFilename;
  47. };
  48. //{{AFX_INSERT_LOCATION}}
  49. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  50. #endif // !defined(AFX_RESTRICTEDFILEDIALOG_H__C461432A_D7EE_11D2_A00A_00104B791122__INCLUDED_)