ReactOS 0.4.16-dev-2279-gc890759
CFontFolderViewCB Class Reference

#include <CFontFolderViewCB.h>

Inheritance diagram for CFontFolderViewCB:
Collaboration diagram for CFontFolderViewCB:

Public Member Functions

 CFontFolderViewCB ()
 
void Initialize (CFontExt *pFontExt, IShellView *psv, LPCITEMIDLIST pidlParent)
 
STDMETHODIMP MessageSFVCB (UINT uMsg, WPARAM wParam, LPARAM lParam) override
 
- 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 ()
 

Private Member Functions

BOOL FilterEvent (PIDLIST_ABSOLUTE *apidls, LONG lEvent) const
 

Private Attributes

CFontExtm_pFontExt = nullptr
 
CComPtr< IShellViewm_pShellView
 
HWND m_hwndView = nullptr
 
CComHeapPtr< ITEMIDLISTm_pidlParent
 

Additional Inherited Members

- 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
 

Detailed Description

Definition at line 10 of file CFontFolderViewCB.h.

Constructor & Destructor Documentation

◆ CFontFolderViewCB()

CFontFolderViewCB::CFontFolderViewCB ( )
inline

Definition at line 22 of file CFontFolderViewCB.h.

22{ }

Member Function Documentation

◆ FilterEvent()

BOOL CFontFolderViewCB::FilterEvent ( PIDLIST_ABSOLUTE apidls,
LONG  lEvent 
) const
private

Definition at line 24 of file CFontFolderViewCB.cpp.

25{
26 lEvent &= ~SHCNE_INTERRUPT;
27
28 switch (lEvent)
29 {
30 case SHCNE_CREATE:
32 case SHCNE_UPDATEDIR:
33 // Refresh font cache and notify the system about the font change
34 if (g_FontCache)
36 break;
37 case SHCNE_DELETE:
38 break;
39 default:
40 return TRUE; // We don't want this event
41 }
42
43 return FALSE;
44}
CFontCache * g_FontCache
Definition: CFontCache.cpp:12
void Read()
Definition: CFontCache.cpp:243
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define SHCNE_DELETE
Definition: shlobj.h:1899
#define SHCNE_RENAMEITEM
Definition: shlobj.h:1897
#define SHCNE_UPDATEDIR
Definition: shlobj.h:1909
#define SHCNE_CREATE
Definition: shlobj.h:1898
HANDLE lEvent
Definition: tftpd.cpp:56

Referenced by MessageSFVCB().

◆ Initialize()

void CFontFolderViewCB::Initialize ( CFontExt pFontExt,
IShellView psv,
LPCITEMIDLIST  pidlParent 
)

Definition at line 12 of file CFontFolderViewCB.cpp.

13{
14 ATLASSERT(pFontExt);
15 ATLASSERT(psv);
16 ATLASSERT(pidlParent);
17 m_pFontExt = pFontExt;
18 m_pShellView = psv;
19 m_pidlParent.Attach(ILClone(pidlParent));
20 if (!m_pidlParent)
21 ERR("m_pidlParent was null\n");
22}
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
#define ERR(fmt,...)
Definition: precomp.h:57
CComHeapPtr< ITEMIDLIST > m_pidlParent
CComPtr< IShellView > m_pShellView
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:238

◆ MessageSFVCB()

STDMETHODIMP CFontFolderViewCB::MessageSFVCB ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
override

Definition at line 47 of file CFontFolderViewCB.cpp.

48{
49 switch (uMsg)
50 {
51 case SFVM_QUERYFSNOTIFY: // Registering change notification
52 {
53 if (!m_pShellView || !m_pFontExt)
54 return E_FAIL;
55 // Now, we can get the view window
56 m_pShellView->GetWindow(&m_hwndView);
58 return S_OK;
59 }
60 case SFVM_FSNOTIFY: // Change notification
61 {
63 return S_FALSE; // Don't process
64 return S_OK;
65 }
66 }
67 return E_NOTIMPL;
68}
void SetViewWindow(HWND hwndView)
Definition: CFontExt.cpp:114
BOOL FilterEvent(PIDLIST_ABSOLUTE *apidls, LONG lEvent) const
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define S_OK
Definition: intsafe.h:52
long LONG
Definition: pedump.c:60
#define SFVM_FSNOTIFY
Definition: shlobj.h:1314
#define SFVM_QUERYFSNOTIFY
Definition: shlobj.h:1323
#define S_FALSE
Definition: winerror.h:3451

Member Data Documentation

◆ m_hwndView

HWND CFontFolderViewCB::m_hwndView = nullptr
private

Definition at line 16 of file CFontFolderViewCB.h.

Referenced by MessageSFVCB().

◆ m_pFontExt

CFontExt* CFontFolderViewCB::m_pFontExt = nullptr
private

Definition at line 14 of file CFontFolderViewCB.h.

Referenced by Initialize(), and MessageSFVCB().

◆ m_pidlParent

CComHeapPtr<ITEMIDLIST> CFontFolderViewCB::m_pidlParent
private

Definition at line 17 of file CFontFolderViewCB.h.

Referenced by Initialize().

◆ m_pShellView

CComPtr<IShellView> CFontFolderViewCB::m_pShellView
private

Definition at line 15 of file CFontFolderViewCB.h.

Referenced by Initialize(), and MessageSFVCB().


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