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.

87 lines
2.3 KiB

  1. #if !defined(AFX_FILEEXT_H__5A23FB9E_92BB_11D1_984E_00C04FB9603F__INCLUDED_)
  2. #define AFX_FILEEXT_H__5A23FB9E_92BB_11D1_984E_00C04FB9603F__INCLUDED_
  3. #if _MSC_VER >= 1000
  4. #pragma once
  5. #endif // _MSC_VER >= 1000
  6. // FileExt.h : header file
  7. //
  8. typedef struct tagEXTEL
  9. {
  10. long lCookie;
  11. long lPriority;
  12. } EXTEL;
  13. typedef struct tagEXT
  14. {
  15. std::vector<EXTEL> v;
  16. bool fDirty;
  17. } EXT;
  18. // Comparitor used to sort the vector of EXTEL elements.
  19. // This ensures that the item with the highest priority is put at the top of
  20. // the list.
  21. class order_EXTEL : public std::binary_function <const EXTEL&, const EXTEL&, bool>
  22. {
  23. public:
  24. bool operator () (const EXTEL& a, const EXTEL& b) const
  25. {
  26. return a.lPriority > b.lPriority;
  27. }
  28. };
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CFileExt dialog
  31. class CFileExt : public CPropertyPage
  32. {
  33. DECLARE_DYNCREATE(CFileExt)
  34. // Construction
  35. public:
  36. CFileExt();
  37. ~CFileExt();
  38. CComponentDataImpl * m_pCDI;
  39. std::map<CString, EXT> m_Extensions;
  40. IClassAdmin * m_pIClassAdmin;
  41. IStream * m_pIStream;
  42. CFileExt ** m_ppThis;
  43. void RefreshData(void);
  44. // Dialog Data
  45. //{{AFX_DATA(CFileExt)
  46. enum { IDD = IDD_FILE_EXT };
  47. // NOTE - ClassWizard will add data members here.
  48. // DO NOT EDIT what you see in these blocks of generated code !
  49. //}}AFX_DATA
  50. // Overrides
  51. // ClassWizard generate virtual function overrides
  52. //{{AFX_VIRTUAL(CFileExt)
  53. public:
  54. virtual BOOL OnApply();
  55. protected:
  56. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  57. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  58. //}}AFX_VIRTUAL
  59. //
  60. protected:
  61. // Generated message map functions
  62. //{{AFX_MSG(CFileExt)
  63. afx_msg void OnMoveUp();
  64. afx_msg void OnMoveDown();
  65. afx_msg void OnExtensionChanged();
  66. virtual BOOL OnInitDialog();
  67. //}}AFX_MSG
  68. DECLARE_MESSAGE_MAP()
  69. };
  70. //{{AFX_INSERT_LOCATION}}
  71. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  72. #endif // !defined(AFX_FILEEXT_H__5A23FB9E_92BB_11D1_984E_00C04FB9603F__INCLUDED_)