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.

69 lines
2.1 KiB

  1. #ifndef _FilePane_h_
  2. #define _FilePane_h_
  3. #include "propwnd2.h"
  4. //UINT CALLBACK _ButtonProc( HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam );
  5. //UINT CALLBACK _CheckProc( HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam );
  6. class CFilePanePropWnd2 : public CPropertyDataWindow2
  7. {
  8. // friend UINT CALLBACK _ButtonProc( HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam );
  9. // friend UINT CALLBACK _CheckProc( HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam );
  10. private:
  11. static UINT CALLBACK OFNHookProc( HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam );
  12. static LRESULT CALLBACK WndProc( HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam );
  13. UINT CALLBACK _OFNHookProc( HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam );
  14. private:
  15. HWND m_hwndEdit;
  16. HWND m_hwndCheck;
  17. HWND m_hwndBrowse;
  18. UINT m_editID;
  19. UINT m_checkID;
  20. UINT m_browseID;
  21. TCHAR m_szOFNData[MAX_PATH];
  22. LPTSTR m_lptstrFilter;
  23. LPTSTR m_lptstrDefExtension;
  24. LPTSTR m_lptstrDefFileName;
  25. OPENFILENAME m_ofn;
  26. BOOL m_fOpenDialog;
  27. public:
  28. CFilePanePropWnd2( HWND hwndParent, UINT uIDD, LPTSTR szClassName, UINT PopUpHelpMenuTextId, int iX, int iY, int iWidth, int iHeight, BOOL bScroll = FALSE );
  29. void SetFilePane( BOOL fOpenDialog, UINT editID, UINT checkID, UINT browseID, LPTSTR lptstDesc, LPTSTR lptstrDefExtension, LPTSTR lptstrDefFileName);
  30. ~CFilePanePropWnd2();
  31. public:
  32. void CreateOutputDir( void );
  33. void QueryFilePath( void );
  34. LPTSTR GetPathAndFile( LPTSTR lpstrPath );
  35. LPTSTR GetPath( LPTSTR lpstrPath );
  36. LPTSTR GetFile( LPTSTR lpstrFile );
  37. void SetFileName(LPTSTR lpstrFullFileName);
  38. BOOL OptionEnabled();
  39. void Enable( BOOL bEnable );
  40. BOOL Validate( BOOL bMsg );
  41. HANDLE CreateFile( DWORD dwDesiredAccess,
  42. DWORD dwShareMode,
  43. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  44. DWORD dwCreationDisposition,
  45. DWORD dwFlagsAndAttributes );
  46. private:
  47. void _Enable( BOOL bEnable );
  48. void _InitOFN( void );
  49. void _CopyString( LPTSTR * szTarget, LPTSTR szSource );
  50. void _CopyFilter( LPTSTR * szTarget, LPTSTR szDesc, LPTSTR szExt );
  51. void _SetDefaultPath( void );
  52. };
  53. #endif