windows-nt/Source/XPSP1/NT/com/ole32/cs/admin/ui/fileext.h

88 lines
2.3 KiB
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
#if !defined(AFX_FILEEXT_H__5A23FB9E_92BB_11D1_984E_00C04FB9603F__INCLUDED_)
#define AFX_FILEEXT_H__5A23FB9E_92BB_11D1_984E_00C04FB9603F__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// FileExt.h : header file
//
typedef struct tagEXTEL
{
long lCookie;
long lPriority;
} EXTEL;
typedef struct tagEXT
{
std::vector<EXTEL> v;
bool fDirty;
} EXT;
// Comparitor used to sort the vector of EXTEL elements.
// This ensures that the item with the highest priority is put at the top of
// the list.
class order_EXTEL : public std::binary_function <const EXTEL&, const EXTEL&, bool>
{
public:
bool operator () (const EXTEL& a, const EXTEL& b) const
{
return a.lPriority > b.lPriority;
}
};
/////////////////////////////////////////////////////////////////////////////
// CFileExt dialog
class CFileExt : public CPropertyPage
{
DECLARE_DYNCREATE(CFileExt)
// Construction
public:
CFileExt();
~CFileExt();
CComponentDataImpl * m_pCDI;
std::map<CString, EXT> m_Extensions;
IClassAdmin * m_pIClassAdmin;
IStream * m_pIStream;
CFileExt ** m_ppThis;
void RefreshData(void);
// Dialog Data
//{{AFX_DATA(CFileExt)
enum { IDD = IDD_FILE_EXT };
// NOTE - ClassWizard will add data members here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CFileExt)
public:
virtual BOOL OnApply();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
//
protected:
// Generated message map functions
//{{AFX_MSG(CFileExt)
afx_msg void OnMoveUp();
afx_msg void OnMoveDown();
afx_msg void OnExtensionChanged();
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FILEEXT_H__5A23FB9E_92BB_11D1_984E_00C04FB9603F__INCLUDED_)