Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygencpanel.h
Go to the documentation of this file.
00001 /* 00002 * Control panel folder 00003 * 00004 * Copyright 2003 Martin Fuchs 00005 * Copyright 2009 Andrew Hill 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00020 */ 00021 00022 #ifndef _SHFLDR_CPANEL_H_ 00023 #define _SHFLDR_CPANEL_H_ 00024 00025 class CControlPanelFolder : 00026 public CComCoClass<CControlPanelFolder, &CLSID_ControlPanel>, 00027 public CComObjectRootEx<CComMultiThreadModelNoCS>, 00028 public IShellFolder2, 00029 public IPersistFolder2, 00030 public IShellExecuteHookA, 00031 public IShellExecuteHookW, 00032 public IContextMenu2 00033 { 00034 private: 00035 /* both paths are parsible from the desktop */ 00036 LPITEMIDLIST pidlRoot; /* absolute pidl */ 00037 int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ 00038 LPCITEMIDLIST *apidl; 00039 UINT cidl; 00040 00041 HRESULT WINAPI ExecuteFromIdList(LPCITEMIDLIST pidl); 00042 00043 public: 00044 CControlPanelFolder(); 00045 ~CControlPanelFolder(); 00046 HRESULT WINAPI FinalConstruct(); 00047 00048 // IShellFolder 00049 virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); 00050 virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); 00051 virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); 00052 virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); 00053 virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); 00054 virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); 00055 virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); 00056 virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); 00057 virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); 00058 virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); 00059 00060 /* ShellFolder2 */ 00061 virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); 00062 virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); 00063 virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); 00064 virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); 00065 virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); 00066 virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); 00067 virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); 00068 00069 // IPersist 00070 virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); 00071 00072 // IPersistFolder 00073 virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); 00074 00075 // IPersistFolder2 00076 virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); 00077 00078 // IShellExecuteHookW 00079 virtual HRESULT WINAPI Execute(LPSHELLEXECUTEINFOW psei); 00080 00081 // IShellExecuteHookA 00082 virtual HRESULT WINAPI Execute(LPSHELLEXECUTEINFOA psei); 00083 00084 // IContextMenu 00085 virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); 00086 virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); 00087 virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); 00088 00089 // IContextMenu2 00090 virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); 00091 00092 DECLARE_REGISTRY_RESOURCEID(IDR_CONTROLPANEL) 00093 DECLARE_NOT_AGGREGATABLE(CControlPanelFolder) 00094 00095 DECLARE_PROTECT_FINAL_CONSTRUCT() 00096 00097 BEGIN_COM_MAP(CControlPanelFolder) 00098 COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) 00099 COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) 00100 COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) 00101 COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) 00102 COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) 00103 COM_INTERFACE_ENTRY_IID(IID_IShellExecuteHookA, IShellExecuteHookA) 00104 COM_INTERFACE_ENTRY_IID(IID_IShellExecuteHookW, IShellExecuteHookW) 00105 COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) 00106 COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) 00107 END_COM_MAP() 00108 }; 00109 00110 #endif // _SHFLDR_CPANEL_H_ Generated on Sun May 27 2012 04:26:16 for ReactOS by
1.7.6.1
|