ReactOS  0.4.15-dev-1070-ge1a01de
CFolderViewCB.cpp
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Zip Shell Extension
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: IShellFolderViewCB implementation
5  * COPYRIGHT: Copyright 2017 David Quintana (gigaherz@gmail.com)
6  * Copyright 2017 Mark Jansen (mark.jansen@reactos.org)
7  */
8 
9 #include "precomp.h"
10 
11 class CFolderViewCB :
12  public CComObjectRootEx<CComMultiThreadModelNoCS>,
13  public IShellFolderViewCB
14 {
15 public:
16 
17  virtual ~CFolderViewCB()
18  {
19  }
20 
21  // *** IShellFolderViewCB methods ***
23  {
24  /* TODO: Handle SFVM_GET_WEBVIEW_CONTENT to add tasks */
25  switch (uMsg)
26  {
27  case SFVM_DEFVIEWMODE:
28  {
29  FOLDERVIEWMODE* pViewMode = (FOLDERVIEWMODE*)lParam;
30  *pViewMode = FVM_DETAILS;
31  return S_OK;
32  }
33  case SFVM_COLUMNCLICK:
34  return S_FALSE;
36  return S_OK;
37  }
38 
39  return E_NOTIMPL;
40  }
41 
42 public:
45 
47  COM_INTERFACE_ENTRY_IID(IID_IShellFolderViewCB, IShellFolderViewCB)
48  END_COM_MAP()
49 };
50 
52 {
53  return ShellObjectCreator<CFolderViewCB>(riid, ppvOut);
54 }
#define REFIID
Definition: guiddef.h:118
HRESULT _CFolderViewCB_CreateInstance(REFIID riid, LPVOID *ppvOut)
REFIID riid
Definition: precomp.h:44
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:611
UINT_PTR WPARAM
Definition: windef.h:207
STDMETHODIMP MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
WPARAM wParam
Definition: combotst.c:138
#define SFVM_COLUMNCLICK
Definition: shlobj.h:1242
#define STDMETHODIMP
Definition: basetyps.h:43
#define S_FALSE
Definition: winerror.h:2357
LONG_PTR LPARAM
Definition: windef.h:208
FOLDERVIEWMODE
Definition: shobjidl.idl:663
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
#define SFVM_BACKGROUNDENUM
Definition: shlobj.h:1250
LONG HRESULT
Definition: typedefs.h:79
virtual ~CFolderViewCB()
#define SFVM_DEFVIEWMODE
Definition: shlobj.h:1245
#define S_OK
Definition: intsafe.h:51
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
#define E_NOTIMPL
Definition: ddrawi.h:99
unsigned int UINT
Definition: ndis.h:50
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:639
#define END_COM_MAP()
Definition: atlcom.h:552
LPARAM lParam
Definition: combotst.c:139