ReactOS  0.4.15-dev-2537-g99d7768
CFontExt Class Reference

#include <CFontExt.hpp>

Inheritance diagram for CFontExt:
Collaboration diagram for CFontExt:

Public Member Functions

 CFontExt ()
 
 ~CFontExt ()
 
virtual STDMETHODIMP GetDefaultSearchGUID (GUID *lpguid)
 
virtual STDMETHODIMP EnumSearches (IEnumExtraSearch **ppenum)
 
virtual STDMETHODIMP GetDefaultColumn (DWORD dwReserved, ULONG *pSort, ULONG *pDisplay)
 
virtual STDMETHODIMP GetDefaultColumnState (UINT iColumn, SHCOLSTATEF *pcsFlags)
 
virtual STDMETHODIMP GetDetailsEx (PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
 
virtual STDMETHODIMP GetDetailsOf (PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
 
virtual STDMETHODIMP MapColumnToSCID (UINT iColumn, SHCOLUMNID *pscid)
 
virtual STDMETHODIMP ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
 
virtual STDMETHODIMP EnumObjects (HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
 
virtual STDMETHODIMP BindToObject (PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
 
virtual STDMETHODIMP BindToStorage (PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
 
virtual STDMETHODIMP CompareIDs (LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
 
virtual STDMETHODIMP CreateViewObject (HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
 
virtual STDMETHODIMP GetAttributesOf (UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
 
virtual STDMETHODIMP GetUIObjectOf (HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
 
virtual STDMETHODIMP GetDisplayNameOf (PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
 
virtual STDMETHODIMP SetNameOf (HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
 
virtual STDMETHODIMP GetCurFolder (LPITEMIDLIST *ppidl)
 
virtual STDMETHODIMP Initialize (LPCITEMIDLIST pidl)
 
virtual STDMETHODIMP GetClassID (CLSID *lpClassId)
 
virtual STDMETHODIMP DragEnter (IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 
virtual STDMETHODIMP DragOver (DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 
virtual STDMETHODIMP DragLeave ()
 
virtual STDMETHODIMP Drop (IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 
HRESULT DoInstallFontFile (LPCWSTR pszFontPath, LPCWSTR pszFontsDir, HKEY hkeyFonts)
 
HRESULT DoGetFontTitle (IN LPCWSTR pszFontPath, OUT CStringW &strFontName)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
- Public Member Functions inherited from IShellFolder
HRESULT ParseDisplayName ([in] HWND hwndOwner, [in] LPBC pbcReserved, [in, string] LPOLESTR lpszDisplayName, [out] ULONG *pchEaten, [out] PIDLIST_RELATIVE *ppidl, [in, out, unique] ULONG *pdwAttributes)
 
HRESULT EnumObjects ([in] HWND hwndOwner, [in] SHCONTF grfFlags, [out] IEnumIDList **ppenumIDList)
 
HRESULT BindToObject ([in] PCUIDLIST_RELATIVE pidl, [in] LPBC pbcReserved, [in] REFIID riid, [out, iid_is(riid)] void **ppvOut)
 
HRESULT BindToStorage ([in] PCUIDLIST_RELATIVE pidl, [in] LPBC pbcReserved, [in] REFIID riid, [out, iid_is(riid)] void **ppvObj)
 
HRESULT CreateViewObject ([in] HWND hwndOwner, [in] REFIID riid, [out, iid_is(riid)] void **ppvOut)
 
HRESULT GetAttributesOf ([in] UINT cidl, [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl, [in, out] SFGAOF *rgfInOut)
 
HRESULT GetUIObjectOf ([in] HWND hwndOwner, [in] UINT cidl, [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl, [in] REFIID riid, [in, out, unique] UINT *prgfInOut, [out, iid_is(riid)] void **ppvOut)
 
HRESULT GetDisplayNameOf ([in] PCUITEMID_CHILD pidl, [in] SHGDNF uFlags, [out] STRRET *lpName)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from IPersistFolder2
HRESULT GetCurFolder ([out] PIDLIST_ABSOLUTE *ppidl)
 
- Public Member Functions inherited from IPersistFolder
HRESULT Initialize ([in] PCIDLIST_ABSOLUTE pidl)
 

Private Attributes

CComHeapPtr< ITEMIDLISTm_Folder
 
CStringW m_LastDetailsFontName
 
WIN32_FIND_DATAW m_LastDetailsFileData
 

Additional Inherited Members

- Public Types inherited from IShellFolder2
typedef struct IShellFolder2::SHCOLUMNIDLPSHCOLUMNID
 
typedef const SHCOLUMNIDLPCSHCOLUMNID
 
- Public Types inherited from IShellFolder
enum  tagSHGDN {
  SHGDN_NORMAL = 0, SHGDN_INFOLDER = 1, SHGDN_FOREDITING = 0x1000, SHGDN_INCLUDE_NONFILESYS = 0x2000,
  SHGDN_FORADDRESSBAR = 0x4000, SHGDN_FORPARSING = 0x8000
}
 
enum  tagSHCONTF {
  SHCONTF_FOLDERS = 32, SHCONTF_NONFOLDERS = 64, SHCONTF_INCLUDEHIDDEN = 128, SHCONTF_INIT_ON_FIRST_NEXT = 256,
  SHCONTF_NETPRINTERSRCH = 512, SHCONTF_SHAREABLE = 1024, SHCONTF_STORAGE = 2048, SHCONTF_NAVIGATION_ENUM = 0x01000,
  SHCONTF_FASTITEMS = 0x02000, SHCONTF_FLATLIST = 0x04000, SHCONTF_ENABLE_ASYNC = 0x08000, SHCONTF_INCLUDESUPERHIDDEN = 0x10000
}
 
typedef IShellFolderLPSHELLFOLDER
 
typedef enum IShellFolder::tagSHGDN SHGNO
 
typedef DWORD SHGDNF
 
typedef DWORD SHCONTF
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IPersistFolder2
typedef IPersistFolder2LPPERSISTFOLDER2
 
- Public Types inherited from IPersistFolder
typedef IPersistFolderLPPERSISTFOLDER
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- Public Types inherited from IDropTarget
typedef IDropTargetLPDROPTARGET
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 
- Public Attributes inherited from IShellFolder
SFGAO_STORAGEANCESTOR typedef ULONG SFGAOF
 
- Public Attributes inherited from IDropTarget
const DWORD MK_ALT = 0x20
 
const DWORD DROPEFFECT_NONE = 0
 
const DWORD DROPEFFECT_COPY = 1
 
const DWORD DROPEFFECT_MOVE = 2
 
const DWORD DROPEFFECT_LINK = 4
 
const DWORD DROPEFFECT_SCROLL = 0x80000000
 
const DWORD DD_DEFSCROLLINSET = 11
 
const DWORD DD_DEFSCROLLDELAY = 50
 
const DWORD DD_DEFSCROLLINTERVAL = 50
 
const DWORD DD_DEFDRAGDELAY = 200
 
const DWORD DD_DEFDRAGMINDIST = 2
 

Detailed Description

Definition at line 11 of file CFontExt.hpp.

Constructor & Destructor Documentation

◆ CFontExt()

CFontExt::CFontExt ( )

Definition at line 76 of file CFontExt.cpp.

77 {
79 }
LONG g_ModuleRefCnt
Definition: ACPPage.cpp:13
#define InterlockedIncrement
Definition: armddk.h:53

◆ ~CFontExt()

CFontExt::~CFontExt ( )

Definition at line 81 of file CFontExt.cpp.

82 {
84 }
LONG g_ModuleRefCnt
Definition: ACPPage.cpp:13
#define InterlockedDecrement
Definition: armddk.h:52

Member Function Documentation

◆ BindToObject()

STDMETHODIMP CFontExt::BindToObject ( PCUIDLIST_RELATIVE  pidl,
LPBC  pbcReserved,
REFIID  riid,
LPVOID ppvOut 
)
virtual

Definition at line 245 of file CFontExt.cpp.

246 {
247  ERR("%s(riid=%S) UNIMPLEMENTED\n", __FUNCTION__, g2s(riid));
248  return E_NOTIMPL;
249 }
REFIID riid
Definition: precomp.h:44
WCHAR * g2s(REFCLSID iid)
Definition: CFontExt.cpp:50
#define ERR(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
#define __FUNCTION__
Definition: types.h:112

◆ BindToStorage()

STDMETHODIMP CFontExt::BindToStorage ( PCUIDLIST_RELATIVE  pidl,
LPBC  pbcReserved,
REFIID  riid,
LPVOID ppvOut 
)
virtual

Definition at line 251 of file CFontExt.cpp.

252 {
253  ERR("%s() UNIMPLEMENTED\n", __FUNCTION__);
254  return E_NOTIMPL;
255 }
#define ERR(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
#define __FUNCTION__
Definition: types.h:112

◆ CompareIDs()

STDMETHODIMP CFontExt::CompareIDs ( LPARAM  lParam,
PCUIDLIST_RELATIVE  pidl1,
PCUIDLIST_RELATIVE  pidl2 
)
virtual

Implements IShellFolder.

Definition at line 257 of file CFontExt.cpp.

258 {
259  const FontPidlEntry* fontEntry1 = _FontFromIL(pidl1);
260  const FontPidlEntry* fontEntry2 = _FontFromIL(pidl2);
261 
262  if (!fontEntry1 || !fontEntry2)
263  return E_INVALIDARG;
264 
265  int result = (int)fontEntry1->Index - (int)fontEntry2->Index;
266 
268 }
GLuint64EXT * result
Definition: glext.h:11304
const FontPidlEntry * _FontFromIL(LPCITEMIDLIST pidl)
Definition: fontpidl.cpp:32
#define MAKE_COMPARE_HRESULT(x)
Definition: shellutils.h:535
#define E_INVALIDARG
Definition: ddrawi.h:101
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

◆ CreateViewObject()

STDMETHODIMP CFontExt::CreateViewObject ( HWND  hwndOwner,
REFIID  riid,
LPVOID ppvOut 
)
virtual

Definition at line 270 of file CFontExt.cpp.

271 {
273 
274  *ppvOut = NULL;
275 
276  if (IsEqualIID(riid, IID_IDropTarget))
277  {
278  ERR("IDropTarget not implemented\n");
279  *ppvOut = static_cast<IDropTarget *>(this);
280  AddRef();
281  hr = S_OK;
282  }
283  else if (IsEqualIID(riid, IID_IContextMenu))
284  {
285  ERR("IContextMenu not implemented\n");
286  hr = E_NOTIMPL;
287  }
288  else if (IsEqualIID(riid, IID_IShellView))
289  {
290  // Just create a default shell folder view, and register ourself as folder
291  SFV_CREATE sfv = { sizeof(SFV_CREATE) };
292  sfv.pshf = this;
293  hr = SHCreateShellFolderView(&sfv, (IShellView**)ppvOut);
294  }
295 
296  return hr;
297 }
#define E_NOINTERFACE
Definition: winerror.h:2364
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
Definition: CDefView.cpp:3755
struct _SFV_CREATE SFV_CREATE
LONG HRESULT
Definition: typedefs.h:79
ULONG AddRef()
#define ERR(fmt,...)
Definition: debug.h:110
IShellFolder * pshf
Definition: shlobj.h:1283
#define S_OK
Definition: intsafe.h:51
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ DoGetFontTitle()

HRESULT CFontExt::DoGetFontTitle ( IN LPCWSTR  pszFontPath,
OUT CStringW strFontName 
)

Definition at line 603 of file CFontExt.cpp.

604 {
605  DWORD cbInfo = 0;
606  BOOL ret = GetFontResourceInfoW(pszFontPath, &cbInfo, NULL, 1);
607  if (!ret || !cbInfo)
608  {
609  ERR("GetFontResourceInfoW failed\n");
610  return E_FAIL;
611  }
612 
613  LPWSTR pszBuffer = strFontName.GetBuffer(cbInfo / sizeof(WCHAR));
614  ret = GetFontResourceInfoW(pszFontPath, &cbInfo, pszBuffer, 1);
615  strFontName.ReleaseBuffer();
616  if (ret)
617  {
618  TRACE("pszFontName: %S\n", (LPCWSTR)strFontName);
619  return S_OK;
620  }
621 
622  ERR("GetFontResourceInfoW failed\n");
623  return E_FAIL;
624 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define E_FAIL
Definition: ddrawi.h:102
unsigned int BOOL
Definition: ntddk_ex.h:94
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define ERR(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
BOOL WINAPI GetFontResourceInfoW(LPCWSTR lpFileName, DWORD *pdwBufSize, void *lpBuffer, DWORD dwType)
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by DoInstallFontFile().

◆ DoInstallFontFile()

HRESULT CFontExt::DoInstallFontFile ( LPCWSTR  pszFontPath,
LPCWSTR  pszFontsDir,
HKEY  hkeyFonts 
)

Definition at line 562 of file CFontExt.cpp.

563 {
564  WCHAR szDestFile[MAX_PATH];
565  LPCWSTR pszFileTitle = PathFindFileName(pszFontPath);
566 
567  CStringW strFontName;
568  if (!DoGetFontTitle(pszFontPath, strFontName))
569  return E_FAIL;
570 
571  RemoveFontResourceW(pszFileTitle);
572 
573  StringCchCopyW(szDestFile, sizeof(szDestFile), pszFontsDir);
574  PathAppendW(szDestFile, pszFileTitle);
575  if (!CopyFileW(pszFontPath, szDestFile, FALSE))
576  {
577  ERR("CopyFileW('%S', '%S') failed\n", pszFontPath, szDestFile);
578  return E_FAIL;
579  }
580 
581  if (!AddFontResourceW(szDestFile))
582  {
583  ERR("AddFontResourceW('%S') failed\n", pszFileTitle);
584  DeleteFileW(szDestFile);
585  return E_FAIL;
586  }
587 
588  DWORD cbData = (wcslen(pszFileTitle) + 1) * sizeof(WCHAR);
589  LONG nError = RegSetValueExW(hkeyFonts, strFontName, 0, REG_SZ,
590  (const BYTE *)pszFileTitle, cbData);
591  if (nError)
592  {
593  ERR("RegSetValueExW failed with %ld\n", nError);
594  RemoveFontResourceW(pszFileTitle);
595  DeleteFileW(szDestFile);
596  return E_FAIL;
597  }
598 
599  return S_OK;
600 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define E_FAIL
Definition: ddrawi.h:102
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:121
int WINAPI AddFontResourceW(_In_ LPCWSTR pszFilename)
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
HRESULT DoGetFontTitle(IN LPCWSTR pszFontPath, OUT CStringW &strFontName)
Definition: CFontExt.cpp:603
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4895
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
Definition: copy.c:439
#define MAX_PATH
Definition: compat.h:34
#define PathFindFileName
Definition: shlwapi.h:911
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL WINAPI RemoveFontResourceW(_In_ LPCWSTR)
unsigned char BYTE
Definition: xxhash.c:193
#define ERR(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:51
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define REG_SZ
Definition: layer.c:22

Referenced by Drop().

◆ DragEnter()

STDMETHODIMP CFontExt::DragEnter ( IDataObject pDataObj,
DWORD  grfKeyState,
POINTL  pt,
DWORD pdwEffect 
)
virtual

Implements IDropTarget.

Definition at line 449 of file CFontExt.cpp.

450 {
451  *pdwEffect = DROPEFFECT_NONE;
452 
453  CComHeapPtr<CIDA> cida;
454  HRESULT hr = _GetCidlFromDataObject(pDataObj, &cida);
455  if (FAILED_UNEXPECTEDLY(hr))
456  return hr;
457 
458  *pdwEffect = DROPEFFECT_COPY;
459  return S_OK;
460 }
HRESULT hr
Definition: shlfolder.c:183
HRESULT _GetCidlFromDataObject(IDataObject *pDataObject, CIDA **ppcida)
Definition: CFontMenu.cpp:14
const DWORD DROPEFFECT_COPY
Definition: oleidl.idl:930
const DWORD DROPEFFECT_NONE
Definition: oleidl.idl:929
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define S_OK
Definition: intsafe.h:51

◆ DragLeave()

STDMETHODIMP CFontExt::DragLeave ( void  )
virtual

Implements IDropTarget.

Definition at line 467 of file CFontExt.cpp.

468 {
469  return S_OK;
470 }
#define S_OK
Definition: intsafe.h:51

◆ DragOver()

STDMETHODIMP CFontExt::DragOver ( DWORD  grfKeyState,
POINTL  pt,
DWORD pdwEffect 
)
virtual

Implements IDropTarget.

Definition at line 462 of file CFontExt.cpp.

463 {
464  return S_OK;
465 }
#define S_OK
Definition: intsafe.h:51

◆ Drop()

STDMETHODIMP CFontExt::Drop ( IDataObject pDataObj,
DWORD  grfKeyState,
POINTL  pt,
DWORD pdwEffect 
)
virtual

Implements IDropTarget.

Definition at line 472 of file CFontExt.cpp.

473 {
474  *pdwEffect = DROPEFFECT_NONE;
475 
476  CComHeapPtr<CIDA> cida;
477  HRESULT hr = _GetCidlFromDataObject(pDataObj, &cida);
478  if (FAILED_UNEXPECTEDLY(hr))
479  return hr;
480 
481  PCUIDLIST_ABSOLUTE pidlParent = HIDA_GetPIDLFolder(cida);
482  if (!pidlParent)
483  {
484  ERR("pidlParent is NULL\n");
485  return E_FAIL;
486  }
487 
488  BOOL bOK = TRUE;
489  CAtlArray<CStringW> FontPaths;
490  for (UINT n = 0; n < cida->cidl; ++n)
491  {
492  PCUIDLIST_RELATIVE pidlRelative = HIDA_GetPIDLItem(cida, n);
493  if (!pidlRelative)
494  continue;
495 
496  PIDLIST_ABSOLUTE pidl = ILCombine(pidlParent, pidlRelative);
497  if (!pidl)
498  {
499  ERR("ILCombine failed\n");
500  bOK = FALSE;
501  break;
502  }
503 
506  ILFree(pidl);
507 
508  if (!ret)
509  {
510  ERR("SHGetPathFromIDListW failed\n");
511  bOK = FALSE;
512  break;
513  }
514 
516  {
517  ERR("PathIsDirectory\n");
518  bOK = FALSE;
519  break;
520  }
521 
522  LPCWSTR pchDotExt = PathFindExtensionW(szPath);
523  if (!IsFontDotExt(pchDotExt))
524  {
525  ERR("'%S' is not supported\n", pchDotExt);
526  bOK = FALSE;
527  break;
528  }
529 
530  FontPaths.Add(szPath);
531  }
532 
533  if (!bOK)
534  return E_FAIL;
535 
536  CRegKey keyFonts;
537  if (keyFonts.Open(FONT_HIVE, FONT_KEY, KEY_WRITE) != ERROR_SUCCESS)
538  {
539  ERR("keyFonts.Open failed\n");
540  return E_FAIL;
541  }
542 
543  for (size_t iItem = 0; iItem < FontPaths.GetCount(); ++iItem)
544  {
545  HRESULT hr = DoInstallFontFile(FontPaths[iItem], g_FontCache->FontPath(), keyFonts.m_hKey);
546  if (FAILED_UNEXPECTEDLY(hr))
547  {
548  bOK = FALSE;
549  break;
550  }
551  }
552 
553  // TODO: update g_FontCache
554 
556 
557  // TODO: Show message
558 
559  return bOK ? S_OK : E_FAIL;
560 }
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1702
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT hr
Definition: shlfolder.c:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define TRUE
Definition: types.h:120
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:699
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1294
static PCUIDLIST_RELATIVE HIDA_GetPIDLItem(CIDA const *pida, SIZE_T i)
Definition: shellutils.h:543
GLdouble n
Definition: glext.h:7729
HRESULT _GetCidlFromDataObject(IDataObject *pDataObject, CIDA **ppcida)
Definition: CFontMenu.cpp:14
#define E_FAIL
Definition: ddrawi.h:102
HKEY m_hKey
Definition: atlbase.h:1013
HRESULT DoInstallFontFile(LPCWSTR pszFontPath, LPCWSTR pszFontsDir, HKEY hkeyFonts)
Definition: CFontExt.cpp:562
const DWORD DROPEFFECT_NONE
Definition: oleidl.idl:929
size_t GetCount() const
Definition: atlcoll.h:373
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL IsFontDotExt(LPCWSTR pchDotExt)
Definition: precomp.h:41
#define FONT_KEY
Definition: precomp.h:31
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:442
#define KEY_WRITE
Definition: nt_native.h:1031
size_t Add(INARGTYPE element)
Definition: atlcoll.h:295
#define FONT_HIVE
Definition: precomp.h:30
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define MAX_PATH
Definition: compat.h:34
LONG Open(HKEY hKeyParent, LPCTSTR lpszKeyName, REGSAM samDesired=KEY_READ|KEY_WRITE)
Definition: atlbase.h:1070
UINT cidl
Definition: shlobj.h:499
#define WM_FONTCHANGE
Definition: winuser.h:1615
int ret
CFontCache * g_FontCache
Definition: CFontCache.cpp:12
static PCUIDLIST_ABSOLUTE HIDA_GetPIDLFolder(CIDA const *pida)
Definition: shellutils.h:538
const CStringW & FontPath() const
Definition: CFontCache.hpp:40
#define ERR(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:51
const ITEMIDLIST_ABSOLUTE UNALIGNED * PCUIDLIST_ABSOLUTE
Definition: shtypes.idl:63
LPCWSTR szPath
Definition: env.c:37
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned int UINT
Definition: ndis.h:50
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57
#define HWND_BROADCAST
Definition: winuser.h:1190

◆ EnumObjects()

STDMETHODIMP CFontExt::EnumObjects ( HWND  hwndOwner,
DWORD  dwFlags,
LPENUMIDLIST *  ppEnumIDList 
)
virtual

Definition at line 240 of file CFontExt.cpp.

241 {
242  return _CEnumFonts_CreateInstance(this, dwFlags, IID_PPV_ARG(IEnumIDList, ppEnumIDList));
243 }
HRESULT _CEnumFonts_CreateInstance(CFontExt *zip, DWORD flags, REFIID riid, LPVOID *ppvOut)
Definition: CEnumFonts.cpp:87
#define IID_PPV_ARG(Itype, ppType)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175

◆ EnumSearches()

STDMETHODIMP CFontExt::EnumSearches ( IEnumExtraSearch **  ppenum)
virtual

Implements IShellFolder2.

Definition at line 93 of file CFontExt.cpp.

94 {
95  ERR("%s() UNIMPLEMENTED\n", __FUNCTION__);
96  return E_NOTIMPL;
97 }
#define ERR(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
#define __FUNCTION__
Definition: types.h:112

◆ GetAttributesOf()

STDMETHODIMP CFontExt::GetAttributesOf ( UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
DWORD rgfInOut 
)
virtual

Definition at line 299 of file CFontExt.cpp.

300 {
301  if (!rgfInOut || !cidl || !apidl)
302  return E_INVALIDARG;
303 
304  DWORD rgf = 0;
305  while (cidl > 0 && *apidl)
306  {
307  const FontPidlEntry* fontEntry = _FontFromIL(*apidl);
308  if (fontEntry)
309  {
310  // We don't support delete yet
311  rgf |= (/*SFGAO_CANDELETE |*/ SFGAO_HASPROPSHEET | SFGAO_CANCOPY | SFGAO_FILESYSTEM);
312  }
313  else
314  {
315  rgf = 0;
316  break;
317  }
318 
319  apidl++;
320  cidl--;
321  }
322 
323  *rgfInOut = rgf;
324  return S_OK;
325 }
const FontPidlEntry * _FontFromIL(LPCITEMIDLIST pidl)
Definition: fontpidl.cpp:32
#define E_INVALIDARG
Definition: ddrawi.h:101
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:51

◆ GetClassID()

STDMETHODIMP CFontExt::GetClassID ( CLSID lpClassId)
virtual

Implements IPersist.

Definition at line 442 of file CFontExt.cpp.

443 {
444  *lpClassId = CLSID_CFontExt;
445  return S_OK;
446 }
#define S_OK
Definition: intsafe.h:51
const GUID CLSID_CFontExt
Definition: fontext.cpp:12

◆ GetCurFolder()

STDMETHODIMP CFontExt::GetCurFolder ( LPITEMIDLIST ppidl)
virtual

Definition at line 398 of file CFontExt.cpp.

399 {
400  if (ppidl && m_Folder)
401  {
402  *ppidl = ILClone(m_Folder);
403  return S_OK;
404  }
405 
406  return E_POINTER;
407 }
CComHeapPtr< ITEMIDLIST > m_Folder
Definition: CFontExt.hpp:18
#define S_OK
Definition: intsafe.h:51
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
#define E_POINTER
Definition: winerror.h:2365

◆ GetDefaultColumn()

STDMETHODIMP CFontExt::GetDefaultColumn ( DWORD  dwReserved,
ULONG pSort,
ULONG pDisplay 
)
virtual

Implements IShellFolder2.

Definition at line 99 of file CFontExt.cpp.

100 {
101  ERR("%s() UNIMPLEMENTED\n", __FUNCTION__);
102  return E_NOTIMPL;
103 }
#define ERR(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
#define __FUNCTION__
Definition: types.h:112

◆ GetDefaultColumnState()

STDMETHODIMP CFontExt::GetDefaultColumnState ( UINT  iColumn,
SHCOLSTATEF pcsFlags 
)
virtual

Implements IShellFolder2.

Definition at line 105 of file CFontExt.cpp.

106 {
107  if (!pcsFlags || iColumn >= _countof(g_ColumnDefs))
108  return E_INVALIDARG;
109 
110  *pcsFlags = g_ColumnDefs[iColumn].dwDefaultState;
111  return S_OK;
112 }
DWORD dwDefaultState
Definition: CFontExt.cpp:18
#define E_INVALIDARG
Definition: ddrawi.h:101
static FolderViewColumns g_ColumnDefs[]
Definition: CFontExt.cpp:23
#define _countof(array)
Definition: sndvol32.h:68
#define S_OK
Definition: intsafe.h:51

◆ GetDefaultSearchGUID()

STDMETHODIMP CFontExt::GetDefaultSearchGUID ( GUID lpguid)
virtual

Implements IShellFolder2.

Definition at line 87 of file CFontExt.cpp.

88 {
89  ERR("%s() UNIMPLEMENTED\n", __FUNCTION__);
90  return E_NOTIMPL;
91 }
#define ERR(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
#define __FUNCTION__
Definition: types.h:112

◆ GetDetailsEx()

STDMETHODIMP CFontExt::GetDetailsEx ( PCUITEMID_CHILD  pidl,
const SHCOLUMNID pscid,
VARIANT pv 
)
virtual

Implements IShellFolder2.

Definition at line 114 of file CFontExt.cpp.

115 {
116  ERR("%s() UNIMPLEMENTED\n", __FUNCTION__);
117  return E_NOTIMPL;
118 }
#define ERR(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
#define __FUNCTION__
Definition: types.h:112

◆ GetDetailsOf()

STDMETHODIMP CFontExt::GetDetailsOf ( PCUITEMID_CHILD  pidl,
UINT  iColumn,
SHELLDETAILS psd 
)
virtual

Implements IShellFolder2.

Definition at line 120 of file CFontExt.cpp.

121 {
122  if (iColumn >= _countof(g_ColumnDefs))
123  return E_FAIL;
124 
125  psd->cxChar = g_ColumnDefs[iColumn].cxChar;
126  psd->fmt = g_ColumnDefs[iColumn].fmt;
127 
128  // No item requested, so return the column name
129  if (pidl == NULL)
130  {
131  return SHSetStrRet(&psd->str, _AtlBaseModule.GetResourceInstance(), g_ColumnDefs[iColumn].iResource);
132  }
133 
134  // Validate that this pidl is the last one
135  PCUIDLIST_RELATIVE curpidl = ILGetNext(pidl);
136  if (curpidl->mkid.cb != 0)
137  {
138  ERR("ERROR, unhandled PIDL!\n");
139  return E_FAIL;
140  }
141 
142  // Name, ReactOS specific?
143  if (iColumn == 0)
144  return GetDisplayNameOf(pidl, 0, &psd->str);
145 
146  const FontPidlEntry* fontEntry = _FontFromIL(pidl);
147  if (!fontEntry)
148  {
149  ERR("ERROR, not a font PIDL!\n");
150  return E_FAIL;
151  }
152 
153  // If we got here, we are in details view!
154  // Let's see if we got info about this file that we can re-use
155  if (m_LastDetailsFontName != fontEntry->Name)
156  {
157  CStringW File = g_FontCache->Filename(fontEntry, true);
160  {
162  ERR("Unable to query info about %S\n", File.GetString());
164  }
165  FindClose(hFile);
166  m_LastDetailsFontName = fontEntry->Name;
167  }
168 
169  // Most code borrowed from CFSFolder::GetDetailsOf
170  FILETIME lft;
172  int ret;
174  CStringA AttrLetters;
175  switch (iColumn)
176  {
177  case 1: // Filename
178  return SHSetStrRet(&psd->str, m_LastDetailsFileData.cFileName);
179  case 2: // Size
180  psd->str.uType = STRRET_CSTR;
181  FileSize.HighPart = m_LastDetailsFileData.nFileSizeHigh;
182  FileSize.LowPart = m_LastDetailsFileData.nFileSizeLow;
184  return S_OK;
185  case 3: // Modified
186  FileTimeToLocalFileTime(&m_LastDetailsFileData.ftLastWriteTime, &lft);
187  FileTimeToSystemTime (&lft, &time);
188  psd->str.uType = STRRET_CSTR;
190  if (ret < 1)
191  {
192  ERR("GetDateFormatA failed\n");
193  return E_FAIL;
194  }
195  psd->str.cStr[ret-1] = ' ';
197  return S_OK;
198  case 4: // Attributes
199  AttrLetters.LoadString(IDS_COL_ATTR_LETTERS);
200  if (AttrLetters.GetLength() != 5)
201  {
202  ERR("IDS_COL_ATTR_LETTERS does not contain 5 letters!\n");
203  return E_FAIL;
204  }
205  psd->str.uType = STRRET_CSTR;
206  ret = 0;
207  if (m_LastDetailsFileData.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
208  psd->str.cStr[ret++] = AttrLetters[0];
209  if (m_LastDetailsFileData.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
210  psd->str.cStr[ret++] = AttrLetters[1];
211  if (m_LastDetailsFileData.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)
212  psd->str.cStr[ret++] = AttrLetters[2];
213  if (m_LastDetailsFileData.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE)
214  psd->str.cStr[ret++] = AttrLetters[3];
215  if (m_LastDetailsFileData.dwFileAttributes & FILE_ATTRIBUTE_COMPRESSED)
216  psd->str.cStr[ret++] = AttrLetters[4];
217  psd->str.cStr[ret] = '\0';
218  return S_OK;
219  default:
220  break;
221  }
222 
224  return E_NOTIMPL;
225 }
int GetLength() const
Definition: atlsimpstr.h:356
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
INT WINAPI GetDateFormatA(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCSTR lpFormat, LPSTR lpDateStr, INT cchOut)
Definition: lcformat.c:922
#define FILE_ATTRIBUTE_SYSTEM
Definition: nt_native.h:704
#define LOCALE_USER_DEFAULT
#define DATE_SHORTDATE
Definition: winnls.h:196
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
Definition: pidl.c:851
CStringW m_LastDetailsFontName
Definition: CFontExt.hpp:19
#define INVALID_HANDLE_VALUE
Definition: compat.h:590
const FontPidlEntry * _FontFromIL(LPCITEMIDLIST pidl)
Definition: fontpidl.cpp:32
LPSTR WINAPI StrFormatKBSizeA(LONGLONG llBytes, LPSTR lpszDest, UINT cchMax)
Definition: string.c:1727
__u16 time
Definition: mkdosfs.c:366
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
Definition: time.c:221
#define E_FAIL
Definition: ddrawi.h:102
STRRET str
Definition: shtypes.idl:108
INT WINAPI GetTimeFormatA(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCSTR lpFormat, LPSTR lpTimeStr, INT cchOut)
Definition: lcformat.c:1030
char cStr[MAX_PATH]
Definition: shtypes.idl:98
virtual STDMETHODIMP GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
Definition: CFontExt.cpp:371
WIN32_FIND_DATAW m_LastDetailsFileData
Definition: CFontExt.hpp:20
static FolderViewColumns g_ColumnDefs[]
Definition: CFontExt.cpp:23
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:188
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define FILE_ATTRIBUTE_COMPRESSED
Definition: nt_native.h:711
#define FILE_ATTRIBUTE_ARCHIVE
Definition: nt_native.h:706
int ret
ULONG LowPart
Definition: typedefs.h:106
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
Definition: fsrtlfuncs.h:108
CFontCache * g_FontCache
Definition: CFontCache.cpp:12
WCHAR Name[1]
Definition: fontpidl.hpp:17
_In_ HANDLE hFile
Definition: mswsock.h:90
#define ERR(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:51
CStringW Filename(const FontPidlEntry *fontEntry, bool alwaysFullPath=false)
Definition: CFontCache.cpp:96
#define IDS_COL_ATTR_LETTERS
Definition: resource.h:11
#define E_NOTIMPL
Definition: ddrawi.h:99
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
#define NULL
Definition: types.h:112
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57
BOOL LoadString(_In_ UINT nID)
Definition: cstringt.h:554
#define UNIMPLEMENTED
Definition: debug.h:115
#define TIME_NOSECONDS
Definition: winnls.h:278
Definition: File.h:15
UINT uType
Definition: shtypes.idl:93
LONGLONG QuadPart
Definition: typedefs.h:114
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502

◆ GetDisplayNameOf()

STDMETHODIMP CFontExt::GetDisplayNameOf ( PCUITEMID_CHILD  pidl,
DWORD  dwFlags,
LPSTRRET  strRet 
)
virtual

Definition at line 371 of file CFontExt.cpp.

372 {
373  if (!pidl)
374  return E_NOTIMPL;
375 
376  // Validate that this pidl is the last one
377  PCUIDLIST_RELATIVE curpidl = ILGetNext(pidl);
378  if (curpidl->mkid.cb != 0)
379  {
380  ERR("ERROR, unhandled PIDL!\n");
381  return E_FAIL;
382  }
383 
384  const FontPidlEntry* fontEntry = _FontFromIL(pidl);
385  if (!fontEntry)
386  return E_FAIL;
387 
388  return SHSetStrRet(strRet, fontEntry->Name);
389 }
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
Definition: pidl.c:851
const FontPidlEntry * _FontFromIL(LPCITEMIDLIST pidl)
Definition: fontpidl.cpp:32
#define E_FAIL
Definition: ddrawi.h:102
WCHAR Name[1]
Definition: fontpidl.hpp:17
#define ERR(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57

Referenced by GetDetailsOf().

◆ GetUIObjectOf()

STDMETHODIMP CFontExt::GetUIObjectOf ( HWND  hwndOwner,
UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
REFIID  riid,
UINT prgfInOut,
LPVOID ppvOut 
)
virtual

Definition at line 328 of file CFontExt.cpp.

329 {
330  if (riid == IID_IContextMenu ||
331  riid == IID_IContextMenu2 ||
332  riid == IID_IContextMenu3)
333  {
334  return _CFontMenu_CreateInstance(hwndOwner, cidl, apidl, this, riid, ppvOut);
335  }
336  else if (riid == IID_IExtractIconA || riid == IID_IExtractIconW)
337  {
338  if (cidl == 1)
339  {
340  const FontPidlEntry* fontEntry = _FontFromIL(*apidl);
341  if (fontEntry)
342  {
344  CStringW File = g_FontCache->Filename(fontEntry);
345  // Just create a default icon extractor based on the filename
346  // We might want to create a preview with the font to get really fancy one day.
348  }
349  }
350  else
351  {
352  ERR("IID_IExtractIcon with cidl != 1 UNIMPLEMENTED\n");
353  }
354  }
355  else if (riid == IID_IDataObject)
356  {
357  if (cidl >= 1)
358  {
359  return _CDataObject_CreateInstance(m_Folder, cidl, apidl, riid, ppvOut);
360  }
361  else
362  {
363  ERR("IID_IDataObject with cidl == 0 UNIMPLEMENTED\n");
364  }
365  }
366 
367  //ERR("%s(riid=%S) UNIMPLEMENTED\n", __FUNCTION__, g2s(riid));
368  return E_NOTIMPL;
369 }
REFIID riid
Definition: precomp.h:44
const FontPidlEntry * _FontFromIL(LPCITEMIDLIST pidl)
Definition: fontpidl.cpp:32
const GUID IID_IDataObject
DWORD dwAttributes
Definition: vdmdbg.h:34
HRESULT _CFontMenu_CreateInstance(HWND hwnd, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, IShellFolder *psf, REFIID riid, LPVOID *ppvOut)
Definition: CFontMenu.cpp:137
unsigned long DWORD
Definition: ntddk_ex.h:95
EXTERN_C HRESULT WINAPI SHCreateFileExtractIconW(LPCWSTR pszPath, DWORD dwFileAttributes, REFIID riid, void **ppv)
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
CFontCache * g_FontCache
Definition: CFontCache.cpp:12
CComHeapPtr< ITEMIDLIST > m_Folder
Definition: CFontExt.hpp:18
#define ERR(fmt,...)
Definition: debug.h:110
CStringW Filename(const FontPidlEntry *fontEntry, bool alwaysFullPath=false)
Definition: CFontCache.cpp:96
#define E_NOTIMPL
Definition: ddrawi.h:99
HRESULT _CDataObject_CreateInstance(PCIDLIST_ABSOLUTE folder, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, LPVOID *ppvOut)
Definition: CDataObject.cpp:38
Definition: File.h:15

◆ Initialize()

STDMETHODIMP CFontExt::Initialize ( LPCITEMIDLIST  pidl)
virtual

Definition at line 411 of file CFontExt.cpp.

412 {
413  WCHAR PidlPath[MAX_PATH + 1] = {0}, FontsDir[MAX_PATH + 1];
414  if (!SHGetPathFromIDListW(pidl, PidlPath))
415  {
416  ERR("Unable to extract path from pidl\n");
417  return E_FAIL;
418  }
419 
420  HRESULT hr = SHGetFolderPathW(NULL, CSIDL_FONTS, NULL, 0, FontsDir);
421  if (FAILED_UNEXPECTEDLY(hr))
422  {
423  ERR("Unable to get fonts path (0x%x)\n", hr);
424  return hr;
425  }
426 
427  if (_wcsicmp(PidlPath, FontsDir))
428  {
429  ERR("CFontExt View initializing on unexpected folder: '%S'\n", PidlPath);
430  return E_FAIL;
431  }
432 
433  m_Folder.Attach(ILClone(pidl));
434  StringCchCatW(FontsDir, _countof(FontsDir), L"\\");
435  g_FontCache->SetFontDir(FontsDir);
436 
437  return S_OK;
438 }
HRESULT hr
Definition: shlfolder.c:183
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1294
#define CSIDL_FONTS
Definition: shlobj.h:2031
#define E_FAIL
Definition: ddrawi.h:102
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
void SetFontDir(const LPCWSTR Path)
Definition: CFontCache.cpp:71
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define _countof(array)
Definition: sndvol32.h:68
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define MAX_PATH
Definition: compat.h:34
static const WCHAR L[]
Definition: oid.c:1250
CFontCache * g_FontCache
Definition: CFontCache.cpp:12
CComHeapPtr< ITEMIDLIST > m_Folder
Definition: CFontExt.hpp:18
#define ERR(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:51
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
#define NULL
Definition: types.h:112
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
Definition: shellpath.c:2208
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)

◆ MapColumnToSCID()

STDMETHODIMP CFontExt::MapColumnToSCID ( UINT  iColumn,
SHCOLUMNID pscid 
)
virtual

Implements IShellFolder2.

Definition at line 227 of file CFontExt.cpp.

228 {
229  //ERR("%s() UNIMPLEMENTED\n", __FUNCTION__);
230  return E_NOTIMPL;
231 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ParseDisplayName()

STDMETHODIMP CFontExt::ParseDisplayName ( HWND  hwndOwner,
LPBC  pbc,
LPOLESTR  lpszDisplayName,
DWORD pchEaten,
PIDLIST_RELATIVE ppidl,
DWORD pdwAttributes 
)
virtual

Definition at line 234 of file CFontExt.cpp.

235 {
236  ERR("%s() UNIMPLEMENTED\n", __FUNCTION__);
237  return E_NOTIMPL;
238 }
#define ERR(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
#define __FUNCTION__
Definition: types.h:112

◆ SetNameOf()

STDMETHODIMP CFontExt::SetNameOf ( HWND  hwndOwner,
PCUITEMID_CHILD  pidl,
LPCOLESTR  lpName,
DWORD  dwFlags,
PITEMID_CHILD pPidlOut 
)
virtual

Implements IShellFolder.

Definition at line 391 of file CFontExt.cpp.

392 {
393  ERR("%s() UNIMPLEMENTED\n", __FUNCTION__);
394  return E_NOTIMPL;
395 }
#define ERR(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
#define __FUNCTION__
Definition: types.h:112

Member Data Documentation

◆ m_Folder

CComHeapPtr<ITEMIDLIST> CFontExt::m_Folder
private

Definition at line 18 of file CFontExt.hpp.

Referenced by GetCurFolder(), GetUIObjectOf(), and Initialize().

◆ m_LastDetailsFileData

WIN32_FIND_DATAW CFontExt::m_LastDetailsFileData
private

Definition at line 20 of file CFontExt.hpp.

Referenced by GetDetailsOf().

◆ m_LastDetailsFontName

CStringW CFontExt::m_LastDetailsFontName
private

Definition at line 19 of file CFontExt.hpp.

Referenced by GetDetailsOf().


The documentation for this class was generated from the following files: