ReactOS 0.4.15-dev-7712-gbbbcd8e
ShellBrowser Struct Reference

Implementation of IShellBrowserImpl interface in explorer child windows. More...

#include <ieframe.h>

Inheritance diagram for ShellBrowser:
Collaboration diagram for ShellBrowser:

Public Member Functions

 ShellBrowser (HWND hwnd, HWND hwndFrame, HWND left_hwnd, WindowHandle &right_hwnd, ShellPathInfo &create_info, BrowserCallback *cb, CtxMenuInterfaces &cm_ifs)
 
virtual ~ShellBrowser ()
 
virtual HRESULT STDMETHODCALLTYPE GetWindow (HWND *lphwnd)
 
virtual HRESULT STDMETHODCALLTYPE QueryActiveShellView (IShellView **ppshv)
 
virtual HRESULT STDMETHODCALLTYPE GetControlWindow (UINT id, HWND *lphwnd)
 
virtual HRESULT STDMETHODCALLTYPE SendControlMsg (UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
 
const Rootget_root () const
 
void OnTreeGetDispInfo (int idCtrl, LPNMHDR pnmh)
 
void OnTreeItemExpanding (int idCtrl, LPNMTREEVIEW pnmtv)
 
void OnTreeItemRClick (int idCtrl, LPNMHDR pnmh)
 
void OnTreeItemSelected (int idCtrl, LPNMTREEVIEW pnmtv)
 
void Init ()
 
int InsertSubitems (HTREEITEM hParentItem, Entry *entry, IShellFolder *pParentFolder)
 
bool jump_to_pidl (LPCITEMIDLIST pidl)
 
HRESULT OnDefaultCommand (LPIDA pida)
 
void UpdateFolderView (IShellFolder *folder)
 
HTREEITEM select_entry (HTREEITEM hitem, Entry *entry, bool expand=true)
 
bool select_folder (Entry *entry, bool expand)
 
void jump_to (LPCITEMIDLIST pidl)
 
void invalidate_cache ()
 
bool TranslateAccelerator (LPMSG lpmsg)
 
- Public Member Functions inherited from IShellBrowserImpl
 IShellBrowserImpl ()
 
virtual ~IShellBrowserImpl ()
 
virtual HRESULT STDMETHODCALLTYPE QueryInterface (REFIID iid, void **ppvObject)
 
virtual ULONG STDMETHODCALLTYPE AddRef ()
 
virtual ULONG STDMETHODCALLTYPE Release ()
 
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp (BOOL fEnterMode)
 
virtual HRESULT STDMETHODCALLTYPE OnDefaultCommand (IShellView *ppshv)
 
virtual HRESULT STDMETHODCALLTYPE OnStateChange (IShellView *ppshv, ULONG uChange)
 
virtual HRESULT STDMETHODCALLTYPE IncludeObject (IShellView *ppshv, LPCITEMIDLIST pidl)
 
virtual HRESULT STDMETHODCALLTYPE InsertMenusSB (HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
 
virtual HRESULT STDMETHODCALLTYPE SetMenuSB (HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject)
 
virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB (HMENU hmenuShared)
 
virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB (LPCOLESTR lpszStatusText)
 
virtual HRESULT STDMETHODCALLTYPE EnableModelessSB (BOOL fEnable)
 
virtual HRESULT STDMETHODCALLTYPE BrowseObject (LPCITEMIDLIST pidl, UINT wFlags)
 
virtual HRESULT STDMETHODCALLTYPE GetViewStateStream (DWORD grfMode, LPSTREAM *ppStrm)
 
virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive (IShellView *ppshv)
 
virtual HRESULT STDMETHODCALLTYPE SetToolbarItems (LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags)
 
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB (LPMSG lpmsg, WORD wID)
 
virtual HRESULT STDMETHODCALLTYPE QueryService (REFGUID guidService, REFIID riid, void **ppvObject)
 
virtual HRESULT STDMETHODCALLTYPE QueryStatus (const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
 
virtual HRESULT STDMETHODCALLTYPE Exec (const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
- Public Member Functions inherited from IShellBrowser
HRESULT InsertMenusSB ([in] HMENU hmenuShared, [in, out] LPOLEMENUGROUPWIDTHS lpMenuWidths)
 
HRESULT SetMenuSB ([in] HMENU hmenuShared, [in] HOLEMENU holemenuReserved, [in] HWND hwndActiveObject)
 
HRESULT RemoveMenusSB ([in] HMENU hmenuShared)
 
HRESULT SetStatusTextSB ([in, unique] LPCOLESTR pszStatusText)
 
HRESULT EnableModelessSB ([in] BOOL fEnable)
 
HRESULT TranslateAcceleratorSB ([in] MSG *pmsg, [in] WORD wID)
 
HRESULT BrowseObject ([in] PCUIDLIST_RELATIVE pidl, [in] UINT wFlags)
 
HRESULT GetViewStateStream ([in] DWORD grfMode, [out] IStream **ppStrm)
 
HRESULT GetControlWindow ([in] UINT id, [out] HWND *phwnd)
 
HRESULT SendControlMsg ([in] UINT id, [in] UINT uMsg, [in] WPARAM wParam, [in] LPARAM lParam, [in] LRESULT *pret)
 
HRESULT QueryActiveShellView ([out] IShellView **ppshv)
 
HRESULT OnViewWindowActive ([in] IShellView *pshv)
 
HRESULT SetToolbarItems ([in] LPTBBUTTONSB lpButtons, [in] UINT nButtons, [in] UINT uFlags)
 
HRESULT GetWindow ([out] HWND *phwnd)
 
HRESULT ContextSensitiveHelp ([in] BOOL fEnterMode)
 
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from ICommDlgBrowser
HRESULT OnDefaultCommand ([in] IShellView *shv)
 
HRESULT OnStateChange ([in] IShellView *shv, [in] ULONG uChange)
 
HRESULT IncludeObject ([in] IShellView *shv, [in] PCUITEMID_CHILD pidl)
 
- Public Member Functions inherited from IServiceProvider
HRESULT QueryService ([in] REFGUID guidService, [in] REFIID riid, [out] void **ppvObject)
 
HRESULT RemoteQueryService ([in] REFGUID guidService, [in] REFIID riid, [out, iid_is(riid)] IUnknown **ppvObject)
 
HRESULT QueryStatus ([in, unique] const GUID *pguidCmdGroup, [in] ULONG cCmds, [in, out, size_is(cCmds)] OLECMD prgCmds[], [in, out, unique] OLECMDTEXT *pCmdText)
 
HRESULT Exec ([in, unique] const GUID *pguidCmdGroup, [in] DWORD nCmdID, [in] DWORD nCmdexecopt, [in, unique] VARIANT *pvaIn, [in, out, unique] VARIANT *pvaOut)
 
- Public Member Functions inherited from IComSrvBase< IShellFolderViewCB, ShellBrowser >
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
- Public Member Functions inherited from IComSrvQI< BASE >
 IComSrvQI (REFIID uuid_base)
 
STDMETHODIMP QueryInterface (REFIID riid, LPVOID *ppv)
 
- Public Member Functions inherited from SimpleComObject
ULONG IncRef ()
 
ULONG DecRef ()
 

Public Attributes

IShellBrowser IShellBrowser_iface
 
IBrowserService IBrowserService_iface
 
IDocObjectService IDocObjectService_iface
 
LONG ref
 
DocHostdoc_host
 
- Public Attributes inherited from IShellBrowserImpl
IShellBrowser IShellBrowser_iface
 
ICommDlgBrowser ICommDlgBrowser_iface
 
IServiceProvider IServiceProvider_iface
 
LONG ref
 
HWND hwndOwner
 

Protected Types

typedef IComSrvBase< IShellFolderViewCB, ShellBrowsersuper
 

Protected Member Functions

void InitializeTree ()
 
bool InitDragDrop ()
 
virtual HRESULT STDMETHODCALLTYPE MessageSFVCB (UINT uMsg, WPARAM wParam, LPARAM lParam)
 shell view callback
 
int get_image_idx (int icon_id)
 
void refresh ()
 
virtual HRESULT OnDefaultCommand (LPIDA pida)
 
- Protected Member Functions inherited from IComSrvBase< IShellFolderViewCB, ShellBrowser >
 IComSrvBase (REFIID uuid_base)
 
- Protected Member Functions inherited from IComSrvQI< BASE >
 IComSrvQI ()
 
virtual ~IComSrvQI ()
 
- Protected Member Functions inherited from ComSrvObject
 ComSrvObject ()
 
virtual ~ComSrvObject ()
 

Protected Attributes

HWND _hwnd
 
HWND _hwndFrame
 
HWND _left_hwnd
 
WindowHandle & _right_hwnd
 
ShellPathInfo_create_info
 
HIMAGELIST _himl
 
HIMAGELIST _himl_old
 
BrowserCallback_callback
 
ShellFolder _folder
 
IShellView_pShellView
 
TreeDropTarget_pDropTarget
 
HTREEITEM _last_sel
 
Root _root
 
ShellDirectory_cur_dir
 
CtxMenuInterfaces_cm_ifs
 
map< int, int_image_map
 
- Protected Attributes inherited from IShellBrowserImpl
DWORD _dwRef
 
- Protected Attributes inherited from IComSrvQI< BASE >
REFIID _uuid_base
 
- Protected Attributes inherited from ComSrvObject
ULONG _ref
 

Additional Inherited Members

- Public Types inherited from IShellBrowser
typedef IShellBrowserLPSHELLBROWSER
 
typedef LPARAM LPTBBUTTONSB
 
typedef LPTBBUTTON LPTBBUTTONSB
 
- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from ICommDlgBrowser
typedef ICommDlgBrowserLPCOMMDLGBROWSER
 
- Public Types inherited from IServiceProvider
typedef IServiceProviderLPSERVICEPROVIDER
 
- Public Types inherited from IOleCommandTarget
enum  OLECMDF {
  OLECMDF_SUPPORTED = 0x1 , OLECMDF_ENABLED = 0x2 , OLECMDF_LATCHED = 0x4 , OLECMDF_NINCHED = 0x8 ,
  OLECMDF_INVISIBLE = 0x10 , OLECMDF_DEFHIDEONCTXTMENU = 0x20
}
 
enum  OLECMDTEXTF { OLECMDTEXTF_NONE = 0 , OLECMDTEXTF_NAME = 1 , OLECMDTEXTF_STATUS = 2 }
 
enum  OLECMDEXECOPT { OLECMDEXECOPT_DODEFAULT = 0 , OLECMDEXECOPT_PROMPTUSER = 1 , OLECMDEXECOPT_DONTPROMPTUSER = 2 , OLECMDEXECOPT_SHOWHELP = 3 }
 
enum  OLECMDID {
  OLECMDID_OPEN = 1 , OLECMDID_NEW = 2 , OLECMDID_SAVE = 3 , OLECMDID_SAVEAS = 4 ,
  OLECMDID_SAVECOPYAS = 5 , OLECMDID_PRINT = 6 , OLECMDID_PRINTPREVIEW = 7 , OLECMDID_PAGESETUP = 8 ,
  OLECMDID_SPELL = 9 , OLECMDID_PROPERTIES = 10 , OLECMDID_CUT = 11 , OLECMDID_COPY = 12 ,
  OLECMDID_PASTE = 13 , OLECMDID_PASTESPECIAL = 14 , OLECMDID_UNDO = 15 , OLECMDID_REDO = 16 ,
  OLECMDID_SELECTALL = 17 , OLECMDID_CLEARSELECTION = 18 , OLECMDID_ZOOM = 19 , OLECMDID_GETZOOMRANGE = 20 ,
  OLECMDID_UPDATECOMMANDS = 21 , OLECMDID_REFRESH = 22 , OLECMDID_STOP = 23 , OLECMDID_HIDETOOLBARS = 24 ,
  OLECMDID_SETPROGRESSMAX = 25 , OLECMDID_SETPROGRESSPOS = 26 , OLECMDID_SETPROGRESSTEXT = 27 , OLECMDID_SETTITLE = 28 ,
  OLECMDID_SETDOWNLOADSTATE = 29 , OLECMDID_STOPDOWNLOAD = 30 , OLECMDID_ONTOOLBARACTIVATED = 31 , OLECMDID_FIND = 32 ,
  OLECMDID_DELETE = 33 , OLECMDID_HTTPEQUIV = 34 , OLECMDID_HTTPEQUIV_DONE = 35 , OLECMDID_ENABLE_INTERACTION = 36 ,
  OLECMDID_ONUNLOAD = 37 , OLECMDID_PROPERTYBAG2 = 38 , OLECMDID_PREREFRESH = 39 , OLECMDID_SHOWSCRIPTERROR = 40 ,
  OLECMDID_SHOWMESSAGE = 41 , OLECMDID_SHOWFIND = 42 , OLECMDID_SHOWPAGESETUP = 43 , OLECMDID_SHOWPRINT = 44 ,
  OLECMDID_CLOSE = 45 , OLECMDID_ALLOWUILESSSAVEAS = 46 , OLECMDID_DONTDOWNLOADCSS = 47 , OLECMDID_UPDATEPAGESTATUS = 48 ,
  OLECMDID_PRINT2 = 49 , OLECMDID_PRINTPREVIEW2 = 50 , OLECMDID_SETPRINTTEMPLATE = 51 , OLECMDID_GETPRINTTEMPLATE = 52 ,
  OLECMDID_PAGEACTIONBLOCKED = 55 , OLECMDID_PAGEACTIONUIQUERY = 56 , OLECMDID_FOCUSVIEWCONTROLS = 57 , OLECMDID_FOCUSVIEWCONTROLSQUERY = 58 ,
  OLECMDID_SHOWPAGEACTIONMENU = 59 , OLECMDID_ADDTRAVELENTRY = 60 , OLECMDID_UPDATETRAVELENTRY = 61 , OLECMDID_UPDATEBACKFORWARDSTATE = 62 ,
  OLECMDID_OPTICAL_ZOOM = 63 , OLECMDID_OPTICAL_GETZOOMRANGE = 64 , OLECMDID_WINDOWSTATECHANGED = 65 , OLECMDID_ACTIVEXINSTALLSCOPE = 66 ,
  OLECMDID_UPDATETRAVELENTRY_DATARECOVERY = 67 , OLECMDID_SHOWTASKDLG = 68 , OLECMDID_POPSTATEEVENT = 69 , OLECMDID_VIEWPORT_MODE = 70 ,
  OLECMDID_LAYOUT_VIEWPORT_WIDTH = 71 , OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM = 72 , OLECMDID_USER_OPTICAL_ZOOM = 73 , OLECMDID_PAGEAVAILABLE = 74 ,
  OLECMDID_GETUSERSCALABLE = 75 , OLECMDID_UPDATE_CARET = 76 , OLECMDID_ENABLE_VISIBILITY = 77 , OLECMDID_MEDIA_PLAYBACK = 78
}
 
typedef IOleCommandTargetLPOLECOMMANDTARGET
 
typedef enum IOleCommandTarget::OLECMDF OLECMDF
 
typedef struct IOleCommandTarget::_tagOLECMD OLECMD
 
typedef struct IOleCommandTarget::_tagOLECMDTEXT OLECMDTEXT
 
typedef enum IOleCommandTarget::OLECMDTEXTF OLECMDTEXTF
 
typedef enum IOleCommandTarget::OLECMDEXECOPT OLECMDEXECOPT
 
typedef enum IOleCommandTarget::OLECMDID OLECMDID
 

Detailed Description

Implementation of IShellBrowserImpl interface in explorer child windows.

Definition at line 84 of file ieframe.h.

Member Typedef Documentation

◆ super

typedef IComSrvBase<IShellFolderViewCB, ShellBrowser> ShellBrowser::super
protected

Definition at line 169 of file shellbrowser.h.

Constructor & Destructor Documentation

◆ ShellBrowser()

ShellBrowser::ShellBrowser ( HWND  hwnd,
HWND  hwndFrame,
HWND  left_hwnd,
WindowHandle &  right_hwnd,
ShellPathInfo create_info,
BrowserCallback cb,
CtxMenuInterfaces cm_ifs 
)

Definition at line 36 of file shellbrowser.cpp.

38 : super(IID_IShellFolderViewCB),
39 _hwnd(hwnd),
40 _hwndFrame(hwndFrame),
41 _left_hwnd(left_hwnd),
42 _right_hwnd(right_hwnd),
43 _create_info(create_info),
45 _cm_ifs(cm_ifs)
46{
49 _last_sel = 0;
50
51 _cur_dir = NULL;
52
53 HDC hDC = GetDC(NULL);
54 if (hDC)
55 {
58
59 DWORD ilMask;
60 if (bpp <= 4)
61 ilMask = ILC_COLOR4;
62 else if (bpp <= 8)
63 ilMask = ILC_COLOR8;
64 else if (bpp <= 16)
65 ilMask = ILC_COLOR16;
66 else if (bpp <= 24)
67 ilMask = ILC_COLOR24;
68 else if (bpp <= 32)
69 ilMask = ILC_COLOR32;
70 else
71 ilMask = ILC_COLOR;
72
73 ilMask |= ILC_MASK;
74
77 }
78}
static HDC hDC
Definition: 3dtext.c:33
#define NULL
Definition: types.h:112
DWORD bpp
Definition: surface.c:185
COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST himl, COLORREF clrBk)
Definition: imagelist.c:2889
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
unsigned long DWORD
Definition: ntddk_ex.h:95
static HDC
Definition: imagelist.c:92
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
#define ILC_COLOR4
Definition: commctrl.h:354
#define ILC_COLOR16
Definition: commctrl.h:356
#define ILC_COLOR8
Definition: commctrl.h:355
#define ILC_COLOR32
Definition: commctrl.h:358
#define ILC_MASK
Definition: commctrl.h:351
#define ILC_COLOR24
Definition: commctrl.h:357
#define ILC_COLOR
Definition: commctrl.h:352
TreeDropTarget * _pDropTarget
Definition: shellbrowser.h:157
IComSrvBase< IShellFolderViewCB, ShellBrowser > super
Definition: shellbrowser.h:169
HIMAGELIST _himl
Definition: shellbrowser.h:150
WindowHandle & _right_hwnd
Definition: shellbrowser.h:148
HTREEITEM _last_sel
Definition: shellbrowser.h:159
BrowserCallback * _callback
Definition: shellbrowser.h:152
CtxMenuInterfaces & _cm_ifs
Definition: shellbrowser.h:164
IShellView * _pShellView
Definition: shellbrowser.h:156
ShellPathInfo & _create_info
Definition: shellbrowser.h:149
ShellDirectory * _cur_dir
Definition: shellbrowser.h:162
int32_t INT
Definition: typedefs.h:58
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define BITSPIXEL
Definition: wingdi.h:720
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD WINAPI GetSysColor(_In_ int)
#define COLOR_WINDOW
Definition: winuser.h:917
#define SM_CYSMICON
Definition: winuser.h:1012
#define SM_CXSMICON
Definition: winuser.h:1011
HDC WINAPI GetDC(_In_opt_ HWND)
int WINAPI GetSystemMetrics(_In_ int)

◆ ~ShellBrowser()

ShellBrowser::~ShellBrowser ( )
virtual

Definition at line 80 of file shellbrowser.cpp.

81{
84
85 if (_pShellView)
87
88 if (_pDropTarget) {
91 }
92
93 if (_right_hwnd) {
95 _right_hwnd = 0;
96 }
97}
virtual ULONG STDMETHODCALLTYPE Release()
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
ULONG Release()
#define TVSIL_NORMAL
Definition: commctrl.h:3443
#define TreeView_SetImageList(hwnd, himl, iImage)
Definition: commctrl.h:3447
HIMAGELIST _himl_old
Definition: shellbrowser.h:151
BOOL WINAPI DestroyWindow(_In_ HWND)

Member Function Documentation

◆ get_image_idx()

int ShellBrowser::get_image_idx ( int  icon_id)
protected

Definition at line 252 of file shellbrowser.cpp.

253{
254 if (icon_id != ICID_NONE) {
256
257 if (found != _image_map.end())
258 return found->second;
259
261
262 _image_map[icon_id] = idx;
263
264 return idx;
265 } else
266 return -1;
267}
_STLP_TEMPLATE_FOR_CONT_EXT iterator find(const _KT &__x)
Definition: _map.h:210
iterator end()
Definition: _map.h:165
_Rep_type::const_iterator const_iterator
Definition: _map.h:86
unsigned int idx
Definition: utils.c:41
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
@ ICID_NONE
Definition: globals.h:64
#define ImageList_AddIcon(himl, hicon)
Definition: commctrl.h:415
IconCache _icon_cache
Definition: globals.h:285
const Icon & get_icon(int icon_id)
Definition: explorer.cpp:625
HICON get_hicon() const
Definition: globals.h:110
map< int, int > _image_map
Definition: shellbrowser.h:174

Referenced by OnTreeGetDispInfo().

◆ get_root()

const Root & ShellBrowser::get_root ( ) const
inline

Definition at line 117 of file shellbrowser.h.

117{return _root;}

Referenced by MDIMainFrame::activate_child_window().

◆ GetControlWindow()

virtual HRESULT STDMETHODCALLTYPE ShellBrowser::GetControlWindow ( UINT  id,
HWND lphwnd 
)
inlinevirtual

Implements IShellBrowser.

Definition at line 82 of file shellbrowser.h.

83 {
84 if (!lphwnd)
85 return E_POINTER;
86
87 if (id == FCW_TREE) {
88 *lphwnd = _left_hwnd;
89 return S_OK;
90 }
91
93
94 if (hwnd) {
95 *lphwnd = hwnd;
96 return S_OK;
97 }
98
99 return E_NOTIMPL;
100 }
#define E_NOTIMPL
Definition: ddrawi.h:99
HANDLE HWND
Definition: compat.h:19
#define PM_GET_CONTROLWINDOW
Definition: explorer.h:64
#define S_OK
Definition: intsafe.h:52
#define E_POINTER
Definition: winerror.h:2365
#define SendMessage
Definition: winuser.h:5842

◆ GetWindow()

virtual HRESULT STDMETHODCALLTYPE ShellBrowser::GetWindow ( HWND lphwnd)
inlinevirtual

Implements IOleWindow.

Definition at line 68 of file shellbrowser.h.

69 {
70 *lphwnd = _hwnd;
71 return S_OK;
72 }

◆ Init()

void ShellBrowser::Init ( )

Definition at line 100 of file shellbrowser.cpp.

101{
102 CONTEXT("ShellBrowser::Init()");
103
104 const String& root_name = GetDesktopFolder().get_name(_create_info._root_shell_path, SHGDN_FORADDRESSBAR);
105
106 _root._drive_type = DRIVE_UNKNOWN;
107 lstrcpy(_root._volname, root_name);
108 _root._fs_flags = 0;
109 lstrcpy(_root._fs, TEXT("Desktop"));
110
112
113 _root._entry->read_directory(SCAN_DONT_ACCESS|SCAN_NO_FILESYSTEM); // avoid to handle desktop root folder as file system directory
114
115 if (_left_hwnd) {
117 InitDragDrop();
118 }
119
121
122 /* already filled by ShellDirectory constructor
123 lstrcpy(_root._entry->_data.cFileName, TEXT("Desktop")); */
124}
@ SCAN_NO_FILESYSTEM
Definition: entries.h:55
@ SCAN_DONT_ACCESS
Definition: entries.h:54
#define TEXT(s)
Definition: k32.h:26
struct _CONTEXT CONTEXT
ShellFolder & GetDesktopFolder()
void InitializeTree()
void jump_to(LPCITEMIDLIST pidl)
bool InitDragDrop()
shell folder entry
Definition: shellfs.h:54
String get_name(LPCITEMIDLIST pidl, SHGDNF flags=SHGDN_NORMAL) const
ShellPath _shell_path
Definition: shellbrowser.h:45
ShellPath _root_shell_path
Definition: shellbrowser.h:46
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
#define DRIVE_UNKNOWN
Definition: winbase.h:256
#define lstrcpy
Definition: winbase.h:3809

Referenced by SDIMainFrame::update_shell_browser(), and MDIShellBrowserChild::update_shell_browser().

◆ InitDragDrop()

bool ShellBrowser::InitDragDrop ( )
protected

Definition at line 198 of file shellbrowser.cpp.

199{
200 CONTEXT("ShellBrowser::InitDragDrop()");
201
203
204 if (!_pDropTarget)
205 return false;
206
208
209 if (FAILED(RegisterDragDrop(_left_hwnd, _pDropTarget))) {//calls addref
210 _pDropTarget->Release(); // free TreeDropTarget
212 return false;
213 } else
215
216 FORMATETC ftetc;
217
218 ftetc.dwAspect = DVASPECT_CONTENT;
219 ftetc.lindex = -1;
220 ftetc.tymed = TYMED_HGLOBAL;
221 ftetc.cfFormat = CF_HDROP;
222
224
225 return true;
226}
#define CF_HDROP
Definition: constants.h:410
void AddSuportedFormat(FORMATETC &ftetc)
Definition: dragdropimpl.h:184
virtual ULONG STDMETHODCALLTYPE AddRef()
Definition: dragdropimpl.h:192
OLE drop target for tree controls.
HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
Definition: ole2.c:557
#define FAILED(hr)
Definition: intsafe.h:51

Referenced by Init().

◆ InitializeTree()

void ShellBrowser::InitializeTree ( )
protected

Definition at line 174 of file shellbrowser.cpp.

175{
176 CONTEXT("ShellBrowserChild::InitializeTree()");
177
180
181 TV_INSERTSTRUCT tvInsert;
182 TV_ITEM& tvItem = tvInsert.item;
183
184 tvInsert.hParent = 0;
185 tvInsert.hInsertAfter = TVI_LAST;
186
188 tvItem.lParam = (LPARAM)_root._entry;
189 tvItem.pszText = _root._volname; //LPSTR_TEXTCALLBACK;
190 tvItem.iImage = tvItem.iSelectedImage = I_IMAGECALLBACK;
191 tvItem.cChildren = 1;
192
196}
#define I_IMAGECALLBACK
Definition: commctrl.h:2385
#define TVI_LAST
Definition: commctrl.h:3370
#define TVIF_TEXT
Definition: commctrl.h:3266
#define TreeView_SelectItem(hwnd, hitem)
Definition: commctrl.h:3481
#define TreeView_Expand(hwnd, hitem, code)
Definition: commctrl.h:3420
#define TVIF_IMAGE
Definition: commctrl.h:3267
#define TVE_EXPAND
Definition: commctrl.h:3423
#define TV_INSERTSTRUCT
Definition: commctrl.h:3377
#define TV_ITEM
Definition: commctrl.h:3300
#define TreeView_SetScrollTime(hwnd, uTime)
Definition: commctrl.h:3584
#define TVIF_PARAM
Definition: commctrl.h:3268
#define TVIF_CHILDREN
Definition: commctrl.h:3272
#define TreeView_InsertItem(hwnd, lpis)
Definition: commctrl.h:3412
#define TVIF_SELECTEDIMAGE
Definition: commctrl.h:3271
LONG_PTR LPARAM
Definition: windef.h:208

Referenced by Init().

◆ InsertSubitems()

int ShellBrowser::InsertSubitems ( HTREEITEM  hParentItem,
Entry entry,
IShellFolder pParentFolder 
)

Definition at line 311 of file shellbrowser.cpp.

312{
313 CONTEXT("ShellBrowser::InsertSubitems()");
314
315 WaitCursor wait;
316
317 int cnt = 0;
318
320
321 try {
322 entry->smart_scan(SORT_NAME, SCAN_DONT_ACCESS);
323 } catch(COMException& e) {
325 }
326
327 // remove old children items
328 HTREEITEM hchild, hnext;
329
330 hnext = TreeView_GetChild(_left_hwnd, hParentItem);
331
332 while((hchild=hnext) != 0) {
333 hnext = TreeView_GetNextSibling(_left_hwnd, hchild);
335 }
336
337 TV_ITEM tvItem;
338 TV_INSERTSTRUCT tvInsert;
339
340 for(entry=entry->_down; entry; entry=entry->_next) {
341#ifndef _LEFT_FILES
342 if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
343#endif
344 {
345 // ignore hidden directories
346 if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
347 continue;
348
349 // ignore directory entries "." and ".."
350 if (entry->_data.cFileName[0]==TEXT('.') &&
351 (entry->_data.cFileName[1]==TEXT('\0') ||
352 (entry->_data.cFileName[1]==TEXT('.') && entry->_data.cFileName[2]==TEXT('\0'))))
353 continue;
354
355 ZeroMemory(&tvItem, sizeof(tvItem));
356
358 tvItem.pszText = LPSTR_TEXTCALLBACK;
359 tvItem.iImage = tvItem.iSelectedImage = I_IMAGECALLBACK;
360 tvItem.lParam = (LPARAM)entry;
361 tvItem.cChildren = entry->_shell_attribs & SFGAO_HASSUBFOLDER? 1: 0;
362
363 if (entry->_shell_attribs & SFGAO_SHARE) {
364 tvItem.mask |= TVIF_STATE;
365 tvItem.stateMask |= TVIS_OVERLAYMASK;
366 tvItem.state |= INDEXTOOVERLAYMASK(1);
367 }
368
369 tvInsert.item = tvItem;
370 tvInsert.hInsertAfter = TVI_LAST;
371 tvInsert.hParent = hParentItem;
372
374
375 ++cnt;
376 }
377 }
378
380
381 return cnt;
382}
VOID WaitCursor(BOOL bBegin)
Definition: dialog.c:114
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
uint32_t entry
Definition: isohybrid.c:63
#define e
Definition: ke_i.h:82
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define TreeView_GetChild(hwnd, hitem)
Definition: commctrl.h:3466
#define LPSTR_TEXTCALLBACK
Definition: commctrl.h:2383
#define TreeView_GetNextSibling(hwnd, hitem)
Definition: commctrl.h:3467
#define TVIS_OVERLAYMASK
Definition: commctrl.h:3287
#define INDEXTOOVERLAYMASK(i)
Definition: commctrl.h:425
#define TVIF_STATE
Definition: commctrl.h:3269
#define TreeView_DeleteItem(hwnd, hitem)
Definition: commctrl.h:3415
void HandleException(COMException &e, HWND hwnd)
Exception Handler for COM exceptions.
Exception with context information.
Definition: shellclasses.h:114
HWND _hMainWnd
Definition: globals.h:275
#define ZeroMemory
Definition: winbase.h:1712
#define WM_SETREDRAW
Definition: winuser.h:1615
#define SORT_NAME
Definition: xpath.c:439

Referenced by OnTreeItemExpanding().

◆ invalidate_cache()

void ShellBrowser::invalidate_cache ( )

◆ jump_to()

void ShellBrowser::jump_to ( LPCITEMIDLIST  pidl)

Definition at line 126 of file shellbrowser.cpp.

127{
128 Entry* entry = NULL;
129
130 if (!_cur_dir)
131 _cur_dir = static_cast<ShellDirectory*>(_root._entry);
132
133 //LOG(FmtString(TEXT("ShellBrowser::jump_to(): pidl=%s"), (LPCTSTR)FileSysShellPath(pidl)));
134
135 // We could call read_tree() here to iterate through the hierarchy and open all folders
136 // from _create_info._root_shell_path (_cur_dir) to _create_info._shell_path (pidl).
137 // To make it easier we just use ILFindChild() instead.
138 if (_cur_dir) {
139 static DynamicFct<LPITEMIDLIST(WINAPI*)(LPCITEMIDLIST, LPCITEMIDLIST)> ILFindChild(TEXT("SHELL32"), 24);
140
141 if (ILFindChild) {
142 for(;;) {
143 LPCITEMIDLIST child_pidl = (*ILFindChild)(_cur_dir->create_absolute_pidl(), pidl);
144 if (!child_pidl || !child_pidl->mkid.cb)
145 break;
146
148
149 entry = _cur_dir->find_entry(child_pidl);
150 if (!entry)
151 break;
152
153 _cur_dir = static_cast<ShellDirectory*>(entry);
155 }
156 } else {
158
159 entry = _cur_dir->find_entry(pidl); // This is not correct in the common case, but works on the desktop level.
160
161 if (entry) {
162 _cur_dir = static_cast<ShellDirectory*>(entry);
164 }
165 }
166 }
167
168 // If not already called, now directly call UpdateFolderView() using pidl
169 if (!entry)
171}
PUIDLIST_RELATIVE WINAPI ILFindChild(PIDLIST_ABSOLUTE pidl1, PCIDLIST_ABSOLUTE pidl2)
Definition: pidl.c:645
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
virtual void entry_selected(Entry *entry)=0
base of all file and directory entries
Definition: entries.h:83
void smart_scan(SORT_ORDER sortOrder=SORT_NAME, int scan_flags=0)
Definition: entries.cpp:353
void UpdateFolderView(IShellFolder *folder)
virtual Entry * find_entry(const void *)
Definition: shellfs.cpp:495
virtual ShellPath create_absolute_pidl() const
Definition: shellfs.cpp:114
IShellFolder smart pointer.
Definition: shellclasses.h:594
#define WINAPI
Definition: msvc.h:6

Referenced by Init(), and SDIMainFrame::jump_to().

◆ jump_to_pidl()

bool ShellBrowser::jump_to_pidl ( LPCITEMIDLIST  pidl)

Definition at line 553 of file shellbrowser.cpp.

554{
555 if (!_root._entry)
556 return false;
557
558 // iterate through the hierarchy and open all folders to reach pidl
559 WaitCursor wait;
560
562 Entry* entry = _root._entry;
563
564 for(const void*p=pidl;;) {
565 if (!p)
566 return true;
567
568 if (!entry || !hitem)
569 break;
570
571 entry->smart_scan(SORT_NAME, SCAN_DONT_ACCESS);
572
573 Entry* found = entry->find_entry(p);
574 p = entry->get_next_path_component(p);
575
576 if (found)
577 hitem = select_entry(hitem, found);
578
579 entry = found;
580 }
581
582 return false;
583}
GLfloat GLfloat p
Definition: glext.h:8902
#define TreeView_GetRoot(hwnd)
Definition: commctrl.h:3475
HTREEITEM select_entry(HTREEITEM hitem, Entry *entry, bool expand=true)

Referenced by MDIShellBrowserChild::jump_to_int().

◆ MessageSFVCB()

HRESULT STDMETHODCALLTYPE ShellBrowser::MessageSFVCB ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
protectedvirtual

shell view callback

Todo:
never reached

Definition at line 472 of file shellbrowser.cpp.

473{
474 if (uMsg == SFVM_INITMENUPOPUP) {
476 InsertMenu((HMENU)lParam, 0, MF_BYPOSITION, 12345, TEXT("TEST ENTRY"));
477 return S_OK;
478 }
479
480 return E_NOTIMPL;
481}
LPARAM lParam
Definition: combotst.c:139
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define SFVM_INITMENUPOPUP
Definition: shlobj.h:1293
#define MF_BYPOSITION
Definition: winuser.h:203
#define InsertMenu
Definition: winuser.h:5802

◆ OnDefaultCommand()

HRESULT ShellBrowser::OnDefaultCommand ( LPIDA  pida)
virtual
Todo:
look for hidden or new subfolders and refresh/add new entry instead of opening a new window

Reimplemented from IShellBrowserImpl.

Definition at line 484 of file shellbrowser.cpp.

485{
486 CONTEXT("ShellBrowser::OnDefaultCommand()");
487
488 if (pida->cidl >= 1) {
489 if (_left_hwnd) { // explorer mode
490 if (_last_sel) {
492
493 if (parent) {
494 try {
495 parent->smart_scan(SORT_NAME, SCAN_DONT_ACCESS);
496 } catch(COMException& e) {
497 return e.Error();
498 }
499
500 UINT firstOffset = pida->aoffset[1];
501 LPITEMIDLIST pidl = (LPITEMIDLIST)((LPBYTE)pida+firstOffset);
502
503 Entry* entry = parent->find_entry(pidl);
504
505 if (entry && (entry->_data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY))
506 if (entry->_etype == ET_SHELL)
508 return S_OK;
509
511 return E_NOTIMPL;
512 }
513 }
514 } else { // no tree control
516 return S_OK;
517
518/* create new Frame Window
519 if (MainFrame::OpenShellFolders(pida, 0))
520 return S_OK;
521*/
522 }
523 }
524
525 return E_NOTIMPL;
526}
r parent
Definition: btrfs.c:3010
@ ET_SHELL
Definition: entries.h:37
LPARAM TreeView_GetItemData(HWND hwndTreeView, HTREEITEM hItem)
Definition: window.h:968
unsigned int UINT
Definition: ndis.h:50
UINT aoffset[1]
Definition: shlobj.h:566
UINT cidl
Definition: shlobj.h:565
static int OpenShellFolders(LPIDA pida, HWND hFrameWnd)
Definition: mainframe.cpp:77
unsigned char * LPBYTE
Definition: typedefs.h:53

◆ OnTreeGetDispInfo()

void ShellBrowser::OnTreeGetDispInfo ( int  idCtrl,
LPNMHDR  pnmh 
)

Definition at line 229 of file shellbrowser.cpp.

230{
231 CONTEXT("ShellBrowser::OnTreeGetDispInfo()");
232
233 LPNMTVDISPINFO lpdi = (LPNMTVDISPINFO)pnmh;
234 ShellEntry* entry = (ShellEntry*)lpdi->item.lParam;
235
236 if (entry) {
237 if (lpdi->item.mask & TVIF_TEXT)
238 lpdi->item.pszText = entry->_display_name;
239
240 if (lpdi->item.mask & (TVIF_IMAGE|TVIF_SELECTEDIMAGE)) {
241 if (lpdi->item.mask & TVIF_IMAGE)
242 lpdi->item.iImage = get_image_idx(
243 entry->safe_extract_icon((ICONCACHE_FLAGS)(ICF_HICON|ICF_OVERLAYS)));
244
245 if (lpdi->item.mask & TVIF_SELECTEDIMAGE)
246 lpdi->item.iSelectedImage = get_image_idx(
247 entry->safe_extract_icon((ICONCACHE_FLAGS)(ICF_HICON|ICF_OVERLAYS|ICF_OPEN)));
248 }
249 }
250}
ICONCACHE_FLAGS
Definition: entries.h:66
@ ICF_HICON
Definition: entries.h:72
@ ICF_OVERLAYS
Definition: entries.h:71
@ ICF_OPEN
Definition: entries.h:70
if(dx< 0)
Definition: linetemp.h:194
#define LPNMTVDISPINFO
Definition: commctrl.h:3676
int get_image_idx(int icon_id)
shell file/directory entry
Definition: shellfs.h:31

Referenced by ShellBrowserChildT< BASE >::Notify().

◆ OnTreeItemExpanding()

void ShellBrowser::OnTreeItemExpanding ( int  idCtrl,
LPNMTREEVIEW  pnmtv 
)

Definition at line 286 of file shellbrowser.cpp.

287{
288 CONTEXT("ShellBrowser::OnTreeItemExpanding()");
289
290 if (pnmtv->action == TVE_COLLAPSE)
292 else if (pnmtv->action == TVE_EXPAND) {
294
295 if (entry)
296 if (!InsertSubitems(pnmtv->itemNew.hItem, entry, entry->_folder)) {
297 entry->_shell_attribs &= ~SFGAO_HASSUBFOLDER;
298
299 // remove subitem "+"
300 TV_ITEM tvItem;
301
302 tvItem.mask = TVIF_CHILDREN;
303 tvItem.hItem = pnmtv->itemNew.hItem;
304 tvItem.cChildren = 0;
305
307 }
308 }
309}
#define TVE_COLLAPSERESET
Definition: commctrl.h:3426
#define TVE_COLLAPSE
Definition: commctrl.h:3422
#define TreeView_SetItem(hwnd, pitem)
Definition: commctrl.h:3497
int InsertSubitems(HTREEITEM hParentItem, Entry *entry, IShellFolder *pParentFolder)

Referenced by ShellBrowserChildT< BASE >::Notify().

◆ OnTreeItemRClick()

void ShellBrowser::OnTreeItemRClick ( int  idCtrl,
LPNMHDR  pnmh 
)

Definition at line 398 of file shellbrowser.cpp.

399{
400 CONTEXT("ShellBrowser::OnTreeItemRClick()");
401
402 TVHITTESTINFO tvhti;
403
404 GetCursorPos(&tvhti.pt);
406
407 tvhti.flags = LVHT_NOWHERE;
409
410 if (TVHT_ONITEM & tvhti.flags) {
411 LPARAM itemData = TreeView_GetItemData(_left_hwnd, tvhti.hItem);
412
413 if (itemData) {
414 Entry* entry = (Entry*)itemData;
416
417 HRESULT hr = entry->do_context_menu(_hwnd, tvhti.pt, _cm_ifs);
418
419 if (SUCCEEDED(hr))
420 refresh();
421 else
422 CHECKERROR(hr);
423 }
424 }
425}
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define TVHT_ONITEM
Definition: commctrl.h:3527
#define LVHT_NOWHERE
Definition: commctrl.h:2493
#define TreeView_HitTest(hwnd, lpht)
Definition: commctrl.h:3513
#define CHECKERROR(hr)
Definition: shellclasses.h:162
HRESULT hr
Definition: shlfolder.c:183
HTREEITEM hItem
Definition: commctrl.h:3521
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2653
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)

Referenced by ShellBrowserChildT< BASE >::Notify().

◆ OnTreeItemSelected()

void ShellBrowser::OnTreeItemSelected ( int  idCtrl,
LPNMTREEVIEW  pnmtv 
)

Definition at line 385 of file shellbrowser.cpp.

386{
387 CONTEXT("ShellBrowser::OnTreeItemSelected()");
388
389 Entry* entry = (Entry*)pnmtv->itemNew.lParam;
390
391 _last_sel = pnmtv->itemNew.hItem;
392
393 if (entry)
395}

Referenced by ShellBrowserChildT< BASE >::Notify().

◆ QueryActiveShellView()

virtual HRESULT STDMETHODCALLTYPE ShellBrowser::QueryActiveShellView ( IShellView **  ppshv)
inlinevirtual

Implements IShellBrowser.

Definition at line 75 of file shellbrowser.h.

76 {
78 *ppshv = _pShellView;
79 return S_OK;
80 }
ULONG AddRef()

◆ refresh()

void ShellBrowser::refresh ( )
protected
Todo:

Definition at line 635 of file shellbrowser.cpp.

636{
638}

Referenced by OnTreeItemRClick().

◆ select_entry()

HTREEITEM ShellBrowser::select_entry ( HTREEITEM  hitem,
Entry entry,
bool  expand = true 
)

Definition at line 529 of file shellbrowser.cpp.

530{
531 CONTEXT("ShellBrowser::select_entry()");
532
534 return 0;
535
536 for(hitem=TreeView_GetChild(_left_hwnd,hitem); hitem; hitem=TreeView_GetNextSibling(_left_hwnd,hitem)) {
537 if ((Entry*)TreeView_GetItemData(_left_hwnd,hitem) == entry) {
538 if (TreeView_SelectItem(_left_hwnd, hitem)) {
539 if (expand)
541
542 return hitem;
543 }
544
545 break;
546 }
547 }
548
549 return 0;
550}
static BOOL expand(LPINT ac, LPTSTR **arg, LPCTSTR pattern)
Definition: misc.c:214

Referenced by jump_to_pidl(), and OnDefaultCommand().

◆ select_folder()

bool ShellBrowser::select_folder ( Entry entry,
bool  expand 
)

Definition at line 607 of file shellbrowser.cpp.

608{
609 CONTEXT("ShellBrowser::expand_folder()");
610
611 if (!_last_sel)
612 return false;
613
615 return false;
616
619 if (TreeView_SelectItem(_left_hwnd, hitem)) {
620 if (expand)
622 return false;
623
624 return true;
625 }
626
627 break;
628 }
629 }
630
631 return false;
632}

Referenced by SDIMainFrame::entry_selected(), and MDIShellBrowserChild::entry_selected().

◆ SendControlMsg()

virtual HRESULT STDMETHODCALLTYPE ShellBrowser::SendControlMsg ( UINT  id,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
LRESULT pret 
)
inlinevirtual

Implements IShellBrowser.

Definition at line 102 of file shellbrowser.h.

103 {
104 if (!pret)
105 return E_POINTER;
106
107 HWND hstatusbar = (HWND)SendMessage(_hwndFrame, PM_GET_CONTROLWINDOW, id, 0);
108
109 if (hstatusbar) {
110 *pret = ::SendMessage(hstatusbar, uMsg, wParam, lParam);
111 return S_OK;
112 }
113
114 return E_NOTIMPL;
115 }
WPARAM wParam
Definition: combotst.c:138

◆ TranslateAccelerator()

bool ShellBrowser::TranslateAccelerator ( LPMSG  lpmsg)

Definition at line 585 of file shellbrowser.cpp.

586{
587 HWND hwnd;
588
589 /* TranslateAccelerator is called for all explorer windows that are open
590 so we have to decide if this is the correct recipient */
591 hwnd = lpmsg->hwnd;
592
593 while(hwnd)
594 {
595 if(hwnd == _hwnd)
596 break;
597
599 }
600
601 if (hwnd)
602 return _pShellView->TranslateAccelerator(lpmsg) == S_OK;
603
604 return false;
605}
HRESULT TranslateAccelerator([in] MSG *pmsg)
HWND hwnd
Definition: winuser.h:3113
HWND WINAPI GetParent(_In_ HWND)

Referenced by MDIShellBrowserChild::WndProc().

◆ UpdateFolderView()

void ShellBrowser::UpdateFolderView ( IShellFolder folder)

Definition at line 428 of file shellbrowser.cpp.

429{
430 CONTEXT("ShellBrowser::UpdateFolderView()");
431
433 IShellView* pLastShellView = _pShellView;
434
435 _folder = folder;
436
437 if (pLastShellView)
438 pLastShellView->GetCurrentInfo(&fs);
439 else {
442 }
443
444 SFV_CREATE sfv_create;
445
446 sfv_create.cbSize = sizeof(SFV_CREATE);
447 sfv_create.pshf = folder;
448 sfv_create.psvOuter = NULL;
449 sfv_create.psfvcb = this;
450
452
453 if (FAILED(hr)) {
455 return;
456 }
457
459 hr = _pShellView->CreateViewWindow(pLastShellView, &fs, static_cast<IShellBrowser*>(this), &rect, &_right_hwnd/*&m_hWndListView*/);
460
461 if (pLastShellView) {
462 pLastShellView->GetCurrentInfo(&fs);
463 pLastShellView->UIActivate(SVUIA_DEACTIVATE);
464 pLastShellView->DestroyViewWindow();
465 pLastShellView->Release();
466 }
467
468 _pShellView->UIActivate(SVUIA_ACTIVATE_NOFOCUS);
469}
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
Definition: CDefView.cpp:3844
#define fs
Definition: i386-dis.c:444
HRESULT CreateViewWindow([in] IShellView *psvPrevious, [in] LPCFOLDERSETTINGS lpfs, [in] IShellBrowser *psb, [out] RECT *prcView, [out] HWND *phWnd)
HRESULT UIActivate([in] UINT uState)
HRESULT DestroyViewWindow()
HRESULT GetCurrentInfo([out] LPFOLDERSETTINGS lpfs)
@ OWM_DETAILS
"rooted" window with special shell namespace root
Definition: mainframe.h:34
struct _SFV_CREATE SFV_CREATE
@ FWF_NOCLIENTEDGE
Definition: shobjidl.idl:640
@ FWF_BESTFITWINDOW
Definition: shobjidl.idl:635
@ FVM_ICON
Definition: shobjidl.idl:668
@ FVM_DETAILS
Definition: shobjidl.idl:672
& rect
Definition: startmenu.cpp:1413
ShellFolder _folder
Definition: shellbrowser.h:154
IShellFolderViewCB * psfvcb
Definition: shlobj.h:1351
IShellView * psvOuter
Definition: shlobj.h:1350
UINT cbSize
Definition: shlobj.h:1348
IShellFolder * pshf
Definition: shlobj.h:1349
Definition: fci.c:116
Definition: ffs.h:70
#define CW_USEDEFAULT
Definition: winuser.h:225

Referenced by SDIMainFrame::entry_selected(), MDIShellBrowserChild::entry_selected(), and jump_to().

Member Data Documentation

◆ _callback

BrowserCallback* ShellBrowser::_callback
protected

Definition at line 152 of file shellbrowser.h.

Referenced by jump_to(), and OnTreeItemSelected().

◆ _cm_ifs

CtxMenuInterfaces& ShellBrowser::_cm_ifs
protected

Definition at line 164 of file shellbrowser.h.

Referenced by OnTreeItemRClick().

◆ _create_info

ShellPathInfo& ShellBrowser::_create_info
protected

Definition at line 149 of file shellbrowser.h.

Referenced by Init(), and UpdateFolderView().

◆ _cur_dir

ShellDirectory* ShellBrowser::_cur_dir
protected

Definition at line 162 of file shellbrowser.h.

Referenced by jump_to(), and ShellBrowser().

◆ _folder

ShellFolder ShellBrowser::_folder
protected

Definition at line 154 of file shellbrowser.h.

Referenced by UpdateFolderView().

◆ _himl

HIMAGELIST ShellBrowser::_himl
protected

◆ _himl_old

HIMAGELIST ShellBrowser::_himl_old
protected

Definition at line 151 of file shellbrowser.h.

Referenced by InitializeTree(), invalidate_cache(), and ~ShellBrowser().

◆ _hwnd

HWND ShellBrowser::_hwnd
protected

Definition at line 145 of file shellbrowser.h.

Referenced by GetWindow(), Init(), OnTreeItemRClick(), and TranslateAccelerator().

◆ _hwndFrame

HWND ShellBrowser::_hwndFrame
protected

Definition at line 146 of file shellbrowser.h.

Referenced by GetControlWindow(), OnDefaultCommand(), and SendControlMsg().

◆ _image_map

map<int, int> ShellBrowser::_image_map
protected

Definition at line 174 of file shellbrowser.h.

Referenced by get_image_idx(), and invalidate_cache().

◆ _last_sel

HTREEITEM ShellBrowser::_last_sel
protected

Definition at line 159 of file shellbrowser.h.

Referenced by OnDefaultCommand(), OnTreeItemSelected(), select_folder(), and ShellBrowser().

◆ _left_hwnd

◆ _pDropTarget

TreeDropTarget* ShellBrowser::_pDropTarget
protected

Definition at line 157 of file shellbrowser.h.

Referenced by InitDragDrop(), ShellBrowser(), and ~ShellBrowser().

◆ _pShellView

IShellView* ShellBrowser::_pShellView
protected

◆ _right_hwnd

WindowHandle& ShellBrowser::_right_hwnd
protected

Definition at line 148 of file shellbrowser.h.

Referenced by UpdateFolderView(), and ~ShellBrowser().

◆ _root

Root ShellBrowser::_root
protected

Definition at line 161 of file shellbrowser.h.

Referenced by get_root().

◆ doc_host

DocHost* ShellBrowser::doc_host

Definition at line 91 of file ieframe.h.

◆ IBrowserService_iface

IBrowserService ShellBrowser::IBrowserService_iface

Definition at line 86 of file ieframe.h.

◆ IDocObjectService_iface

IDocObjectService ShellBrowser::IDocObjectService_iface

Definition at line 87 of file ieframe.h.

◆ IShellBrowser_iface

IShellBrowser ShellBrowser::IShellBrowser_iface

Definition at line 85 of file ieframe.h.

◆ ref

LONG ShellBrowser::ref

Definition at line 89 of file ieframe.h.


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