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.

100 lines
2.7 KiB

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