Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / WINNT / client_exp / shell_ext.h
blob9e0a9c7861d32ea137d3f7542dc43e1dd546c389
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
10 #if !defined(AFX_SHELLEXT_H__DC515C28_6CAC_11D1_BAE7_00C04FD140D2__INCLUDED_)
11 #define AFX_SHELLEXT_H__DC515C28_6CAC_11D1_BAE7_00C04FD140D2__INCLUDED_
13 #if _MSC_VER >= 1000
14 #pragma once
15 #endif // _MSC_VER >= 1000
16 // shell_ext.h : header file
19 #include <shlobj.h>
21 extern ULONG nCMRefCount; // IContextMenu ref count
22 extern ULONG nSERefCount; // IShellExtInit ref count
23 extern ULONG nICRefCount; // IContextMenu ref count
24 extern ULONG nTPRefCount; // IQueryInfo ref count
25 extern ULONG nXPRefCount; // IPersistFile ref count
27 #define _STR_EXT_TITLE "AfsClientContextMenu"
28 #define _STR_EXT_TITLE2 "AfsClientOverlayHandler"
29 #define STR_EXT_TITLE TEXT(_STR_EXT_TITLE)
30 #define STR_EXT_TITLE2 TEXT(_STR_EXT_TITLE2)
31 #define STR_REG_PATH TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellIconOverlayIdentifiers")
33 /////////////////////////////////////////////////////////////////////////////
34 // CShellExt command target
36 class CShellExt : public CCmdTarget
38 DECLARE_DYNCREATE(CShellExt)
40 BOOL m_bDirSelected;
41 BOOL m_bIsSymlink; // is symbolic link!
42 TCHAR m_szFile[MAX_PATH];
43 BOOL m_bIsOverlayEnabled;
44 int m_overlayObject;
45 BOOL IsOverlayEnabled(){return m_bIsOverlayEnabled;}
47 CStringArray m_astrFileNames;
49 CShellExt(); // protected constructor used by dynamic creation
50 LPMALLOC m_pAlloc;
52 // Attributes
53 public:
55 // Operations
56 public:
57 int GetOverlayObject() {return m_overlayObject;}
58 // Overrides
59 // ClassWizard generated virtual function overrides
60 //{{AFX_VIRTUAL(CShellExt)
61 public:
62 virtual void OnFinalRelease();
63 //}}AFX_VIRTUAL
65 // Implementation
66 protected:
67 virtual ~CShellExt();
69 // Generated message map functions
70 //{{AFX_MSG(CShellExt)
71 // NOTE - the ClassWizard will add and remove member functions here.
72 //}}AFX_MSG
74 DECLARE_MESSAGE_MAP()
75 // Generated OLE dispatch map functions
76 //{{AFX_DISPATCH(CShellExt)
77 // NOTE - the ClassWizard will add and remove member functions here.
78 //}}AFX_DISPATCH
79 DECLARE_DISPATCH_MAP()
81 DECLARE_OLECREATE(CShellExt)
83 // IFileViewer interface
84 BEGIN_INTERFACE_PART(MenuExt, IContextMenu)
85 STDMETHOD(QueryContextMenu)( HMENU hmenu,UINT indexMenu,UINT idCmdFirst,
86 UINT idCmdLast,UINT uFlags);
87 STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici);
88 STDMETHOD(GetCommandString)(UINT_PTR idCmd,UINT uType,UINT* pwReserved,LPSTR pszName,
89 UINT cchMax);
90 END_INTERFACE_PART(MenuExt)
92 // IShellExtInit interface
93 BEGIN_INTERFACE_PART(ShellInit, IShellExtInit)
94 STDMETHOD(Initialize)(LPCITEMIDLIST pidlFolder,IDataObject *lpdobj, HKEY hkeyProgID);
95 END_INTERFACE_PART(ShellInit)
97 BEGIN_INTERFACE_PART(IconExt, IShellIconOverlayIdentifier)
98 STDMETHOD(GetOverlayInfo)(LPWSTR pwszIconFile,int cchMax,int* pIndex,DWORD* pdwFlags);
99 STDMETHOD(GetPriority)(int* pPriority);
100 STDMETHOD(IsMemberOf)(LPCWSTR pwszPath,DWORD dwAttrib);
101 END_INTERFACE_PART(IconExt)
103 BEGIN_INTERFACE_PART(ToolTipExt, IQueryInfo)
104 STDMETHOD(GetInfoTip)(DWORD dwFlags, LPWSTR *ppwszTip);
105 STDMETHOD(GetInfoFlags)(LPDWORD pdwFlags);
106 END_INTERFACE_PART(ToolTipExt)
108 BEGIN_INTERFACE_PART(PersistFileExt, IPersistFile)
109 STDMETHOD(Load)(LPCOLESTR wszFile, DWORD dwMode);
110 STDMETHOD(GetClassID)(LPCLSID);
111 STDMETHOD(IsDirty)(VOID);
112 STDMETHOD(Save)(LPCOLESTR, BOOL);
113 STDMETHOD(SaveCompleted)(LPCOLESTR);
114 STDMETHOD(GetCurFile)(LPOLESTR FAR*);
115 END_INTERFACE_PART(PersistFileExt)
117 DECLARE_INTERFACE_MAP()
120 class CShellExt2 : public CShellExt
122 public:
123 DECLARE_DYNCREATE(CShellExt2)
124 CShellExt2() : CShellExt()
126 m_overlayObject = 1;
128 ~CShellExt2()
131 DECLARE_OLECREATE(CShellExt2)
134 /////////////////////////////////////////////////////////////////////////////
136 //{{AFX_INSERT_LOCATION}}
137 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
139 #endif // !defined(AFX_SHELLEXT_H__DC515C28_6CAC_11D1_BAE7_00C04FD140D2__INCLUDED_)