ReactOS  0.4.14-dev-991-g696cdc6
CDesktopBrowser Class Reference
Inheritance diagram for CDesktopBrowser:
Collaboration diagram for CDesktopBrowser:

Public Member Functions

 CDesktopBrowser ()
 
 ~CDesktopBrowser ()
 
HRESULT Initialize (IShellDesktopTray *ShellDeskx)
 
virtual HRESULT STDMETHODCALLTYPE GetWindow (HWND *lphwnd)
 
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp (BOOL fEnterMode)
 
virtual HRESULT STDMETHODCALLTYPE InsertMenusSB (HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
 
virtual HRESULT STDMETHODCALLTYPE SetMenuSB (HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject)
 
virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB (HMENU hmenuShared)
 
virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB (LPCOLESTR pszStatusText)
 
virtual HRESULT STDMETHODCALLTYPE EnableModelessSB (BOOL fEnable)
 
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB (MSG *pmsg, WORD wID)
 
virtual HRESULT STDMETHODCALLTYPE BrowseObject (LPCITEMIDLIST pidl, UINT wFlags)
 
virtual HRESULT STDMETHODCALLTYPE GetViewStateStream (DWORD grfMode, IStream **ppStrm)
 
virtual HRESULT STDMETHODCALLTYPE GetControlWindow (UINT id, HWND *lphwnd)
 
virtual HRESULT STDMETHODCALLTYPE SendControlMsg (UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
 
virtual HRESULT STDMETHODCALLTYPE QueryActiveShellView (struct IShellView **ppshv)
 
virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive (struct IShellView *ppshv)
 
virtual HRESULT STDMETHODCALLTYPE SetToolbarItems (LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags)
 
virtual HRESULT STDMETHODCALLTYPE QueryService (REFGUID guidService, REFIID riid, void **ppvObject)
 
LRESULT OnEraseBkgnd (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSettingChange (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnClose (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnOpenNewWindow (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCommand (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSetFocus (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
- 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 IShellBrowser
HRESULT BrowseObject ([in] PCUIDLIST_RELATIVE pidl, [in] UINT wFlags)
 
- 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 IServiceProvider
HRESULT RemoteQueryService ([in] REFGUID guidService, [in] REFIID riid, [out, iid_is(riid)] IUnknown **ppvObject)
 

Private Member Functions

LRESULT _NotifyTray (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HRESULT _Resize ()
 

Private Attributes

HACCEL m_hAccel
 
HWND m_hWndShellView
 
CComPtr< IShellDesktopTray > m_Tray
 
CComPtr< IShellViewm_ShellView
 

Additional Inherited Members

- Public Types inherited from IShellBrowser
typedef IShellBrowserLPSHELLBROWSER
 
typedef LPTBBUTTON LPTBBUTTONSB
 
- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IServiceProvider
typedef IServiceProviderLPSERVICEPROVIDER
 
- 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 IShellBrowser
FCT_ADDTOEND typedef LPARAM LPTBBUTTONSB
 

Detailed Description

Definition at line 35 of file CDesktopBrowser.cpp.

Constructor & Destructor Documentation

◆ CDesktopBrowser()

CDesktopBrowser::CDesktopBrowser ( )

Definition at line 106 of file CDesktopBrowser.cpp.

106  :
107  m_hAccel(NULL),
109 {
110 }
smooth NULL
Definition: ftsmooth.c:416

◆ ~CDesktopBrowser()

CDesktopBrowser::~CDesktopBrowser ( )

Definition at line 112 of file CDesktopBrowser.cpp.

113 {
114  if (m_ShellView.p != NULL && m_hWndShellView != NULL)
115  {
116  m_ShellView->DestroyViewWindow();
117  }
118 }
CComPtr< IShellView > m_ShellView
smooth NULL
Definition: ftsmooth.c:416

Member Function Documentation

◆ _NotifyTray()

LRESULT CDesktopBrowser::_NotifyTray ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
private

Definition at line 337 of file CDesktopBrowser.cpp.

338 {
339  HWND hWndTray;
340  HRESULT hRet;
341 
342  hRet = m_Tray->GetTrayWindow(&hWndTray);
343  if (SUCCEEDED(hRet))
344  ::PostMessageW(hWndTray, uMsg, wParam, lParam);
345 
346  return 0;
347 }
WPARAM wParam
Definition: combotst.c:138
CComPtr< IShellDesktopTray > m_Tray
LONG HRESULT
Definition: typedefs.h:78
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPARAM lParam
Definition: combotst.c:139
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by OnClose(), and OnCommand().

◆ _Resize()

HRESULT CDesktopBrowser::_Resize ( )
private

Definition at line 140 of file CDesktopBrowser.cpp.

141 {
142  RECT rcNewSize;
143 
144 #ifdef MULTIMONITOR_SUPPORT
145 
146  UINT cMonitors = GetSystemMetrics(SM_CMONITORS);
147  if (cMonitors == 1)
148  {
149  SystemParametersInfoW(SPI_GETWORKAREA, 0, &rcNewSize, 0);
150  }
151  else
152  {
153  SetRect(&rcNewSize,
158  }
159 
160  ::MoveWindow(m_hWnd, rcNewSize.left, rcNewSize.top, rcNewSize.right - rcNewSize.left, rcNewSize.bottom - rcNewSize.top, TRUE);
161  ::MoveWindow(m_hWndShellView, 0, 0, rcNewSize.right - rcNewSize.left, rcNewSize.bottom - rcNewSize.top, TRUE);
162 
163  if (cMonitors != 1)
164  {
165  CAtlList<RECT> list;
167  RECT* prcWorkAreas = new RECT[list.GetCount()];
168  int i = 0;
169  for (POSITION it = list.GetHeadPosition(); it; list.GetNext(it))
170  prcWorkAreas[i++] = list.GetAt(it);
171 
173 
175  }
176 
177 #else
178  SystemParametersInfoW(SPI_GETWORKAREA, 0, &rcNewSize, 0);
179  ::MoveWindow(m_hWnd, rcNewSize.left, rcNewSize.top, rcNewSize.right - rcNewSize.left, rcNewSize.bottom - rcNewSize.top, TRUE);
180  ::MoveWindow(m_hWndShellView, 0, 0, rcNewSize.right - rcNewSize.left, rcNewSize.bottom - rcNewSize.top, TRUE);
181 
182 #endif
183  return S_OK;
184 }
#define TRUE
Definition: types.h:120
#define SM_XVIRTUALSCREEN
Definition: winuser.h:1026
BOOL WINAPI EnumDisplayMonitors(_In_opt_ HDC, _In_opt_ LPCRECT, _In_ MONITORENUMPROC, _In_ LPARAM)
#define SM_CMONITORS
Definition: winuser.h:1030
#define SM_CXVIRTUALSCREEN
Definition: winuser.h:1028
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
BOOL CALLBACK MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, RECT *rcMonitor, LPARAM Param)
Definition: screensave.c:33
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HWND hwndListView
Definition: eventvwr.c:83
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define LVM_SETWORKAREAS
Definition: commctrl.h:2778
#define SM_CYVIRTUALSCREEN
Definition: winuser.h:1029
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
int WINAPI GetSystemMetrics(_In_ int)
HWND WINAPI FindWindowExW(_In_opt_ HWND, _In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
Definition: _list.h:228
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define SM_YVIRTUALSCREEN
Definition: winuser.h:1027
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define S_OK
Definition: intsafe.h:59
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define list
Definition: rosglue.h:35
unsigned int UINT
Definition: ndis.h:50
#define WC_LISTVIEW
Definition: commctrl.h:2255
LONG bottom
Definition: windef.h:309

Referenced by Initialize(), and OnSettingChange().

◆ BrowseObject()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject ( LPCITEMIDLIST  pidl,
UINT  wFlags 
)
virtual

Definition at line 280 of file CDesktopBrowser.cpp.

281 {
282  /*
283  * We should use IShellWindows interface here in order to attempt to
284  * find an open shell window that shows the requested pidl and activate it
285  */
286 
287  DWORD dwFlags = ((wFlags & SBSP_EXPLOREMODE) != 0) ? SH_EXPLORER_CMDLINE_FLAG_E : 0;
288  return SHOpenNewFrame(ILClone(pidl), NULL, 0, dwFlags);
289 }
#define SH_EXPLORER_CMDLINE_FLAG_E
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI SHOpenNewFrame(LPITEMIDLIST pidl, IUnknown *paramC, long param10, DWORD dwFlags)
Definition: desktopipc.cpp:578
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228

◆ ContextSensitiveHelp()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::ContextSensitiveHelp ( BOOL  fEnterMode)
virtual

Implements IOleWindow.

Definition at line 243 of file CDesktopBrowser.cpp.

244 {
245  return E_NOTIMPL;
246 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ EnableModelessSB()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::EnableModelessSB ( BOOL  fEnable)
virtual

Implements IShellBrowser.

Definition at line 268 of file CDesktopBrowser.cpp.

269 {
270  return E_NOTIMPL;
271 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetControlWindow()

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

Implements IShellBrowser.

Definition at line 296 of file CDesktopBrowser.cpp.

297 {
298  if (lphwnd == NULL)
299  return E_POINTER;
300  return E_NOTIMPL;
301 }
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_POINTER
Definition: winerror.h:2365

◆ GetViewStateStream()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetViewStateStream ( DWORD  grfMode,
IStream **  ppStrm 
)
virtual

Implements IShellBrowser.

Definition at line 291 of file CDesktopBrowser.cpp.

292 {
293  return E_NOTIMPL;
294 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetWindow ( HWND lphwnd)
virtual

Implements IOleWindow.

Definition at line 235 of file CDesktopBrowser.cpp.

236 {
237  if (lphwnd == NULL)
238  return E_POINTER;
239  *lphwnd = m_hWnd;
240  return S_OK;
241 }
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ Initialize()

HRESULT CDesktopBrowser::Initialize ( IShellDesktopTray *  ShellDeskx)

Definition at line 186 of file CDesktopBrowser.cpp.

187 {
188  CComPtr<IShellFolder> psfDesktop;
189  HRESULT hRet;
190  hRet = SHGetDesktopFolder(&psfDesktop);
191  if (FAILED_UNEXPECTEDLY(hRet))
192  return hRet;
193 
194  m_Tray = ShellDesk;
195 
197  if (!m_hWnd)
198  return E_FAIL;
199 
200  CSFV csfv = {sizeof(CSFV), psfDesktop};
201  hRet = SHCreateShellFolderViewEx(&csfv, &m_ShellView);
202  if (FAILED_UNEXPECTEDLY(hRet))
203  return hRet;
204 
205  m_Tray->RegisterDesktopWindow(m_hWnd);
206  if (FAILED_UNEXPECTEDLY(hRet))
207  return hRet;
208 
210  RECT rcShellView = {0,0,0,0};
211  fs.ViewMode = FVM_ICON;
213  hRet = m_ShellView->CreateViewWindow(NULL, &fs, (IShellBrowser *)this, &rcShellView, &m_hWndShellView);
214  if (FAILED_UNEXPECTEDLY(hRet))
215  return hRet;
216 
217  _Resize();
218 
221 
223 
224 #if 1
225  /* A Windows8+ specific hack */
228 #endif
230  UpdateWindow();
231 
232  return hRet;
233 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
struct _CSFV CSFV
_In_ BOOLEAN Create
Definition: pstypes.h:511
CComPtr< IShellView > m_ShellView
Definition: shlobj.h:1200
BOOL WINAPI UpdateWindow(_In_ HWND)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define WS_CLIPCHILDREN
Definition: pedump.c:619
Definition: fs.h:235
#define E_FAIL
Definition: ddrawi.h:102
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
CComPtr< IShellDesktopTray > m_Tray
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
HACCEL WINAPI LoadAcceleratorsW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
HWND hwndListView
Definition: eventvwr.c:83
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI SHCreateShellFolderViewEx(LPCSFV psvcbi, IShellView **ppsv)
Definition: CDefView.cpp:3459
#define SW_SHOW
Definition: winuser.h:769
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
LONG HRESULT
Definition: typedefs.h:78
#define IDA_DESKBROWSER
Definition: shresdef.h:26
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
HWND WINAPI FindWindowExW(_In_opt_ HWND, _In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
BOOL WINAPI SetShellWindowEx(HWND, HWND)
Definition: ntwrapper.h:58
#define fs
Definition: i386-dis.c:435
#define WS_POPUP
Definition: pedump.c:616
#define WC_LISTVIEW
Definition: commctrl.h:2255
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
static const WCHAR szProgmanWindowName[]

◆ InsertMenusSB()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::InsertMenusSB ( HMENU  hmenuShared,
LPOLEMENUGROUPWIDTHS  lpMenuWidths 
)
virtual

Implements IShellBrowser.

Definition at line 248 of file CDesktopBrowser.cpp.

249 {
250  return E_NOTIMPL;
251 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OnClose()

LRESULT CDesktopBrowser::OnClose ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 414 of file CDesktopBrowser.cpp.

415 {
416  return _NotifyTray(TWM_DOEXITWINDOWS, 0, 0);
417 }
#define TWM_DOEXITWINDOWS
Definition: undocshell.h:56
LRESULT _NotifyTray(UINT uMsg, WPARAM wParam, LPARAM lParam)

◆ OnCommand()

LRESULT CDesktopBrowser::OnCommand ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 349 of file CDesktopBrowser.cpp.

350 {
351  switch (LOWORD(wParam))
352  {
354  return _NotifyTray(TWM_DOEXITWINDOWS, 0, 0);
356  if (GetKeyState(VK_SHIFT))
357  return _NotifyTray(TWM_CYCLEFOCUS, 1, 0xFFFFFFFF);
358  else
359  return _NotifyTray(TWM_CYCLEFOCUS, 1, 1);
362  break;
364  if (m_ShellView)
365  m_ShellView->Refresh();
366  break;
367  }
368 
369  return 0;
370 }
#define TWM_CYCLEFOCUS
Definition: undocshell.h:57
#define TWM_DOEXITWINDOWS
Definition: undocshell.h:56
CComPtr< IShellView > m_ShellView
#define FCIDM_DESKBROWSER_REFRESH
Definition: shresdef.h:744
WPARAM wParam
Definition: combotst.c:138
BOOL WINAPI SHFindFiles(PCIDLIST_ABSOLUTE pidlFolder, PCIDLIST_ABSOLUTE pidlSaveFile)
Definition: shellord.c:2120
#define VK_SHIFT
Definition: winuser.h:2177
#define FCIDM_DESKBROWSER_CLOSE
Definition: shresdef.h:741
smooth NULL
Definition: ftsmooth.c:416
#define FCIDM_DESKBROWSER_FOCUS
Definition: shresdef.h:742
SHORT WINAPI GetKeyState(_In_ int)
LRESULT _NotifyTray(UINT uMsg, WPARAM wParam, LPARAM lParam)
#define FCIDM_DESKBROWSER_SEARCH
Definition: shresdef.h:743
#define LOWORD(l)
Definition: pedump.c:82

◆ OnEraseBkgnd()

LRESULT CDesktopBrowser::OnEraseBkgnd ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 373 of file CDesktopBrowser.cpp.

374 {
375  return (LRESULT)PaintDesktop((HDC)wParam);
376 }
static HDC
Definition: imagelist.c:92
WPARAM wParam
Definition: combotst.c:138
BOOL WINAPI PaintDesktop(_In_ HDC)
LONG_PTR LRESULT
Definition: windef.h:209

◆ OnOpenNewWindow()

LRESULT CDesktopBrowser::OnOpenNewWindow ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 419 of file CDesktopBrowser.cpp.

420 {
421  TRACE("Proxy Desktop message 1035 received.\n");
423  return 0;
424 }
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI SHOnCWMCommandLine(HANDLE hSharedInfo)
Definition: desktopipc.cpp:530
LPARAM lParam
Definition: combotst.c:139

◆ OnSetFocus()

LRESULT CDesktopBrowser::OnSetFocus ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 426 of file CDesktopBrowser.cpp.

427 {
429  return 0;
430 }
HWND WINAPI SetFocus(_In_opt_ HWND)

◆ OnSettingChange()

LRESULT CDesktopBrowser::OnSettingChange ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 391 of file CDesktopBrowser.cpp.

392 {
393  if (uMsg == WM_SETTINGCHANGE /* == WM_WININICHANGE */ &&
394  lstrcmpiW((LPCWSTR)lParam, L"Environment") == 0)
395  {
396  LPVOID lpEnvironment;
397  RegenerateUserEnvironment(&lpEnvironment, TRUE);
398  }
399 
400  if (m_hWndShellView)
401  {
402  /* Forward the message */
404  }
405 
406  if (uMsg == WM_SETTINGCHANGE && wParam == SPI_SETWORKAREA && m_hWndShellView != NULL)
407  {
408  _Resize();
409  }
410 
411  return 0;
412 }
#define TRUE
Definition: types.h:120
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
WPARAM wParam
Definition: combotst.c:138
#define WM_SETTINGCHANGE
Definition: winuser.h:1611
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
smooth NULL
Definition: ftsmooth.c:416
EXTERN_C BOOL WINAPI RegenerateUserEnvironment(LPVOID *lpEnvironment, BOOL bUpdateSelf)
Definition: shell32.cpp:71
static const WCHAR L[]
Definition: oid.c:1250
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPARAM lParam
Definition: combotst.c:139

◆ OnSize()

LRESULT CDesktopBrowser::OnSize ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 378 of file CDesktopBrowser.cpp.

379 {
380  if (wParam == SIZE_MINIMIZED)
381  {
382  /* Hey, we're the desktop!!! */
383  ::ShowWindow(m_hWnd, SW_RESTORE);
384  }
385 
387 
388  return 0;
389 }
#define TRUE
Definition: types.h:120
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_RESTORE
Definition: winuser.h:773
WPARAM wParam
Definition: combotst.c:138
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define SIZE_MINIMIZED
Definition: winuser.h:2481

◆ OnViewWindowActive()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::OnViewWindowActive ( struct IShellView ppshv)
virtual

Implements IShellBrowser.

Definition at line 321 of file CDesktopBrowser.cpp.

322 {
323  return E_NOTIMPL;
324 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ QueryActiveShellView()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::QueryActiveShellView ( struct IShellView **  ppshv)
virtual

Implements IShellBrowser.

Definition at line 310 of file CDesktopBrowser.cpp.

311 {
312  if (ppshv == NULL)
313  return E_POINTER;
314  *ppshv = m_ShellView;
315  if (m_ShellView != NULL)
316  m_ShellView->AddRef();
317 
318  return S_OK;
319 }
CComPtr< IShellView > m_ShellView
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ QueryService()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::QueryService ( REFGUID  guidService,
REFIID  riid,
void **  ppvObject 
)
virtual

Implements IServiceProvider.

Definition at line 331 of file CDesktopBrowser.cpp.

332 {
333  /* FIXME - handle guidService */
334  return QueryInterface(riid, ppv);
335 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)

◆ RemoveMenusSB()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::RemoveMenusSB ( HMENU  hmenuShared)
virtual

Implements IShellBrowser.

Definition at line 258 of file CDesktopBrowser.cpp.

259 {
260  return E_NOTIMPL;
261 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SendControlMsg()

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

Implements IShellBrowser.

Definition at line 303 of file CDesktopBrowser.cpp.

304 {
305  if (pret == NULL)
306  return E_POINTER;
307  return E_NOTIMPL;
308 }
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_POINTER
Definition: winerror.h:2365

◆ SetMenuSB()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::SetMenuSB ( HMENU  hmenuShared,
HOLEMENU  holemenuRes,
HWND  hwndActiveObject 
)
virtual

Implements IShellBrowser.

Definition at line 253 of file CDesktopBrowser.cpp.

254 {
255  return E_NOTIMPL;
256 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetStatusTextSB()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::SetStatusTextSB ( LPCOLESTR  pszStatusText)
virtual

Implements IShellBrowser.

Definition at line 263 of file CDesktopBrowser.cpp.

264 {
265  return E_NOTIMPL;
266 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetToolbarItems()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::SetToolbarItems ( LPTBBUTTON  lpButtons,
UINT  nButtons,
UINT  uFlags 
)
virtual

Implements IShellBrowser.

Definition at line 326 of file CDesktopBrowser.cpp.

327 {
328  return E_NOTIMPL;
329 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ TranslateAcceleratorSB()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::TranslateAcceleratorSB ( MSG pmsg,
WORD  wID 
)
virtual

Implements IShellBrowser.

Definition at line 273 of file CDesktopBrowser.cpp.

274 {
275  if (!::TranslateAcceleratorW(m_hWnd, m_hAccel, lpmsg))
276  return S_FALSE;
277  return S_OK;
278 }
#define S_FALSE
Definition: winerror.h:2357
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
#define S_OK
Definition: intsafe.h:59

Member Data Documentation

◆ m_hAccel

HACCEL CDesktopBrowser::m_hAccel
private

Definition at line 42 of file CDesktopBrowser.cpp.

Referenced by Initialize(), and TranslateAcceleratorSB().

◆ m_hWndShellView

HWND CDesktopBrowser::m_hWndShellView
private

◆ m_ShellView

CComPtr<IShellView> CDesktopBrowser::m_ShellView
private

Definition at line 45 of file CDesktopBrowser.cpp.

Referenced by Initialize(), OnCommand(), QueryActiveShellView(), and ~CDesktopBrowser().

◆ m_Tray

CComPtr<IShellDesktopTray> CDesktopBrowser::m_Tray
private

Definition at line 44 of file CDesktopBrowser.cpp.

Referenced by _NotifyTray(), and Initialize().


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