ReactOS 0.4.16-dev-178-g8ba6102
CDesktopFolderViewCB Class Reference

#include <CDesktopFolder.h>

Inheritance diagram for CDesktopFolderViewCB:
Collaboration diagram for CDesktopFolderViewCB:

Public Member Functions

 CDesktopFolderViewCB ()
 
void Initialize (IShellView *psv)
 
bool IsProgmanHostedBrowser ()
 
STDMETHOD() MessageSFVCB (UINT uMsg, WPARAM wParam, LPARAM lParam) override
 
STDMETHOD() ShouldShow (IShellFolder *psf, PCIDLIST_ABSOLUTE pidlFolder, PCUITEMID_CHILD pidlItem) override
 
STDMETHODIMP GetEnumFlags (IShellFolder *, PCIDLIST_ABSOLUTE, HWND *, DWORD *) 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 ()
 
HRESULT ShouldShow ([in] IShellFolder *psf, [in, unique] PCIDLIST_ABSOLUTE pidlFolder, [in] PCUITEMID_CHILD pidlItem)
 
HRESULT GetEnumFlags ([in] IShellFolder *psf, [in] PCIDLIST_ABSOLUTE pidlFolder, [out] HWND *phwnd, [in, out] DWORD *pgrfFlags)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Static Public Member Functions

static bool IsProgmanHostedBrowser (IShellView *psv)
 
- 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)
 

Private Attributes

IShellViewm_pShellView
 
UINT8 m_IsProgmanHosted
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 148 of file CDesktopFolder.h.

Constructor & Destructor Documentation

◆ CDesktopFolderViewCB()

CDesktopFolderViewCB::CDesktopFolderViewCB ( )
inline

Definition at line 157 of file CDesktopFolder.h.

Member Function Documentation

◆ GetEnumFlags()

STDMETHODIMP CDesktopFolderViewCB::GetEnumFlags ( IShellFolder ,
PCIDLIST_ABSOLUTE  ,
HWND ,
DWORD  
)
inlineoverride

Implements IFolderFilter.

Definition at line 167 of file CDesktopFolder.h.

167{ return E_NOTIMPL; }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Initialize()

void CDesktopFolderViewCB::Initialize ( IShellView psv)
inline

Definition at line 158 of file CDesktopFolder.h.

158{ m_pShellView = psv; }
IShellView * m_pShellView

◆ IsProgmanHostedBrowser() [1/2]

bool CDesktopFolderViewCB::IsProgmanHostedBrowser ( )

Definition at line 1044 of file CDesktopFolder.cpp.

1045{
1046 enum { Uninitialized = 0, NotHosted, IsHosted };
1047 C_ASSERT(Uninitialized == 0);
1048 if (m_IsProgmanHosted == Uninitialized)
1050 return m_IsProgmanHosted == IsHosted;
1051}
#define C_ASSERT(e)
Definition: intsafe.h:73

Referenced by IsProgmanHostedBrowser(), and ShouldShow().

◆ IsProgmanHostedBrowser() [2/2]

bool CDesktopFolderViewCB::IsProgmanHostedBrowser ( IShellView psv)
static

Definition at line 1038 of file CDesktopFolder.cpp.

1039{
1041 return SUCCEEDED(psv->GetCurrentInfo(&settings)) && (settings.fFlags & FWF_DESKTOP);
1042}
struct mke2fs_defaults settings[]
HRESULT GetCurrentInfo([out] LPFOLDERSETTINGS lpfs)
#define SUCCEEDED(hr)
Definition: intsafe.h:50
@ FWF_DESKTOP
Definition: shobjidl.idl:647

◆ MessageSFVCB()

HRESULT WINAPI CDesktopFolderViewCB::MessageSFVCB ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
override

Definition at line 1065 of file CDesktopFolder.cpp.

1066{
1067 switch (uMsg)
1068 {
1069 case SFVM_VIEWRELEASE:
1071 return S_OK;
1072 }
1073 return E_NOTIMPL;
1074}
#define SFVM_VIEWRELEASE
#define NULL
Definition: types.h:112
#define S_OK
Definition: intsafe.h:52

◆ ShouldShow()

HRESULT WINAPI CDesktopFolderViewCB::ShouldShow ( IShellFolder psf,
PCIDLIST_ABSOLUTE  pidlFolder,
PCUITEMID_CHILD  pidlItem 
)
override

Implements IFolderFilter.

Definition at line 1053 of file CDesktopFolder.cpp.

1054{
1055 const CLSID* pClsid;
1056 if (IsProgmanHostedBrowser() && (pClsid = IsRegItem(pidlItem)) != NULL)
1057 {
1058 const BOOL NewStart = SHELL_GetSetting(SSF_STARTPANELON, fStartPanelOn);
1059 LPCWSTR SubKey = NewStart ? L"HideDesktopIcons\\NewStartPanel" : L"HideDesktopIcons\\ClassicStartMenu";
1060 return SHELL32_IsShellFolderNamespaceItemHidden(SubKey, *pClsid) ? S_FALSE : S_OK;
1061 }
1062 return S_OK;
1063}
static const CLSID * IsRegItem(PCUITEMID_CHILD pidl)
BOOL SHELL32_IsShellFolderNamespaceItemHidden(LPCWSTR SubKey, REFCLSID Clsid)
unsigned int BOOL
Definition: ntddk_ex.h:94
#define L(x)
Definition: ntvdm.h:50
#define SHELL_GetSetting(pss, ssf, field)
Definition: shellutils.h:828
#define SSF_STARTPANELON
Definition: shlobj.h:1625
#define S_FALSE
Definition: winerror.h:2357
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Member Data Documentation

◆ m_IsProgmanHosted

UINT8 CDesktopFolderViewCB::m_IsProgmanHosted
private

Definition at line 154 of file CDesktopFolder.h.

Referenced by IsProgmanHostedBrowser().

◆ m_pShellView

IShellView* CDesktopFolderViewCB::m_pShellView
private

Definition at line 153 of file CDesktopFolder.h.

Referenced by IsProgmanHostedBrowser(), and MessageSFVCB().


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