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.

45 lines
1.3 KiB

  1. ////////////////////////////////////////////////////////////////
  2. // MSDN -- August 2000
  3. // If this code works, it was written by Paul DiLascia.
  4. // If not, I don't know who wrote it.
  5. // Compiles with Visual C++ 6.0, runs on Windows 98 and probably NT too.
  6. //
  7. #pragma once
  8. // Windows 2000 version of OPENFILENAME.
  9. // The new version has three extra members.
  10. // This is copied from commdlg.h
  11. //
  12. struct OPENFILENAMEEX : public OPENFILENAME {
  13. void * pvReserved;
  14. DWORD dwReserved;
  15. DWORD FlagsEx;
  16. };
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CFileDialogEx: Encapsulate Windows-2000 style open dialog.
  19. //
  20. class CFileDialogEx : public CFileDialog {
  21. DECLARE_DYNAMIC(CFileDialogEx)
  22. public:
  23. CFileDialogEx(BOOL bOpenFileDialog, // TRUE for open, FALSE for FileSaveAs
  24. LPCTSTR lpszDefExt = NULL,
  25. LPCTSTR lpszFileName = NULL,
  26. DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
  27. LPCTSTR lpszFilter = NULL,
  28. CWnd* pParentWnd = NULL);
  29. // override
  30. virtual INT_PTR DoModal();
  31. protected:
  32. OPENFILENAMEEX m_ofnEx; // new Windows 2000 version of OPENFILENAME
  33. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  34. DECLARE_MESSAGE_MAP()
  35. //{{AFX_MSG(CFileDialogEx)
  36. //}}AFX_MSG
  37. };
  38. BOOL HasModernFileDialog();