ReactOS  0.4.15-dev-1150-g593bcce
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)
 
LRESULT OnGetChangeNotifyServer (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
 
CComPtr< IOleWindowm_ChangeNotifyServer
 
HWND m_hwndChangeNotifyServer
 

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 34 of file CDesktopBrowser.cpp.

Constructor & Destructor Documentation

◆ CDesktopBrowser()

CDesktopBrowser::CDesktopBrowser ( )

Definition at line 110 of file CDesktopBrowser.cpp.

110  :
111  m_hAccel(NULL),
114 {
115 }
smooth NULL
Definition: ftsmooth.c:416

◆ ~CDesktopBrowser()

CDesktopBrowser::~CDesktopBrowser ( )

Definition at line 117 of file CDesktopBrowser.cpp.

118 {
119  if (m_ShellView.p != NULL && m_hWndShellView != NULL)
120  {
121  m_ShellView->DestroyViewWindow();
122  }
123 
125  {
127  }
128 }
CComPtr< IShellView > m_ShellView
BOOL WINAPI DestroyWindow(_In_ HWND)
smooth NULL
Definition: ftsmooth.c:416

Member Function Documentation

◆ _NotifyTray()

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

Definition at line 346 of file CDesktopBrowser.cpp.

347 {
348  HWND hWndTray;
349  HRESULT hRet;
350 
351  hRet = m_Tray->GetTrayWindow(&hWndTray);
352  if (SUCCEEDED(hRet))
353  ::PostMessageW(hWndTray, uMsg, wParam, lParam);
354 
355  return 0;
356 }
WPARAM wParam
Definition: combotst.c:138
CComPtr< IShellDesktopTray > m_Tray
LONG HRESULT
Definition: typedefs.h:79
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPARAM lParam
Definition: combotst.c:139
#define SUCCEEDED(hr)
Definition: intsafe.h:49

Referenced by OnClose(), and OnCommand().

◆ _Resize()

HRESULT CDesktopBrowser::_Resize ( )
private

Definition at line 150 of file CDesktopBrowser.cpp.

151 {
152  RECT rcNewSize;
153 
154 #ifdef MULTIMONITOR_SUPPORT
155 
156  UINT cMonitors = GetSystemMetrics(SM_CMONITORS);
157  if (cMonitors == 1)
158  {
159  SystemParametersInfoW(SPI_GETWORKAREA, 0, &rcNewSize, 0);
160  }
161  else
162  {
163  SetRect(&rcNewSize,
168  }
169 
170  ::MoveWindow(m_hWnd, rcNewSize.left, rcNewSize.top, rcNewSize.right - rcNewSize.left, rcNewSize.bottom - rcNewSize.top, TRUE);
171  ::MoveWindow(m_hWndShellView, 0, 0, rcNewSize.right - rcNewSize.left, rcNewSize.bottom - rcNewSize.top, TRUE);
172 
173  if (cMonitors != 1)
174  {
175  CAtlList<RECT> list;
177  RECT* prcWorkAreas = new RECT[list.GetCount()];
178  int i = 0;
179  for (POSITION it = list.GetHeadPosition(); it; list.GetNext(it))
180  prcWorkAreas[i++] = list.GetAt(it);
181 
183 
185  }
186 
187 #else
188  SystemParametersInfoW(SPI_GETWORKAREA, 0, &rcNewSize, 0);
189  ::MoveWindow(m_hWnd, rcNewSize.left, rcNewSize.top, rcNewSize.right - rcNewSize.left, rcNewSize.bottom - rcNewSize.top, TRUE);
190  ::MoveWindow(m_hWndShellView, 0, 0, rcNewSize.right - rcNewSize.left, rcNewSize.bottom - rcNewSize.top, TRUE);
191 
192 #endif
193  return S_OK;
194 }
#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
#define TRUE
Definition: types.h:120
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:51
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 289 of file CDesktopBrowser.cpp.

290 {
291  /*
292  * We should use IShellWindows interface here in order to attempt to
293  * find an open shell window that shows the requested pidl and activate it
294  */
295 
296  DWORD dwFlags = ((wFlags & SBSP_EXPLOREMODE) != 0) ? SH_EXPLORER_CMDLINE_FLAG_E : 0;
297  return SHOpenNewFrame(ILClone(pidl), NULL, 0, dwFlags);
298 }
#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:584
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 252 of file CDesktopBrowser.cpp.

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

◆ EnableModelessSB()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::EnableModelessSB ( BOOL  fEnable)
virtual

Implements IShellBrowser.

Definition at line 277 of file CDesktopBrowser.cpp.

278 {
279  return E_NOTIMPL;
280 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetControlWindow()

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

Implements IShellBrowser.

Definition at line 305 of file CDesktopBrowser.cpp.

306 {
307  if (lphwnd == NULL)
308  return E_POINTER;
309  return E_NOTIMPL;
310 }
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 300 of file CDesktopBrowser.cpp.

301 {
302  return E_NOTIMPL;
303 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetWindow ( HWND lphwnd)
virtual

Implements IOleWindow.

Definition at line 244 of file CDesktopBrowser.cpp.

245 {
246  if (lphwnd == NULL)
247  return E_POINTER;
248  *lphwnd = m_hWnd;
249  return S_OK;
250 }
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365

◆ Initialize()

HRESULT CDesktopBrowser::Initialize ( IShellDesktopTray *  ShellDeskx)

Definition at line 196 of file CDesktopBrowser.cpp.

197 {
198  CComPtr<IShellFolder> psfDesktop;
199  HRESULT hRet;
200  hRet = SHGetDesktopFolder(&psfDesktop);
201  if (FAILED_UNEXPECTEDLY(hRet))
202  return hRet;
203 
204  m_Tray = ShellDesk;
205 
207  if (!m_hWnd)
208  return E_FAIL;
209 
210  CSFV csfv = {sizeof(CSFV), psfDesktop};
211  hRet = SHCreateShellFolderViewEx(&csfv, &m_ShellView);
212  if (FAILED_UNEXPECTEDLY(hRet))
213  return hRet;
214 
215  m_Tray->RegisterDesktopWindow(m_hWnd);
216  if (FAILED_UNEXPECTEDLY(hRet))
217  return hRet;
218 
220  RECT rcShellView = {0,0,0,0};
221  fs.ViewMode = FVM_ICON;
223  hRet = m_ShellView->CreateViewWindow(NULL, &fs, (IShellBrowser *)this, &rcShellView, &m_hWndShellView);
224  if (FAILED_UNEXPECTEDLY(hRet))
225  return hRet;
226 
227  _Resize();
228 
230 
232 
233 #if 1
234  /* A Windows8+ specific hack */
237 #endif
239  UpdateWindow();
240 
241  return hRet;
242 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
struct _CSFV CSFV
_In_ BOOLEAN Create
Definition: pstypes.h:519
CComPtr< IShellView > m_ShellView
Definition: shlobj.h:1201
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
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:3735
#define SW_SHOW
Definition: winuser.h:769
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
LONG HRESULT
Definition: typedefs.h:79
#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)
#define shell32_hInstance
#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 257 of file CDesktopBrowser.cpp.

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

◆ OnClose()

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

Definition at line 423 of file CDesktopBrowser.cpp.

424 {
425  return _NotifyTray(TWM_DOEXITWINDOWS, 0, 0);
426 }
#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 358 of file CDesktopBrowser.cpp.

359 {
360  switch (LOWORD(wParam))
361  {
363  return _NotifyTray(TWM_DOEXITWINDOWS, 0, 0);
365  if (GetKeyState(VK_SHIFT))
366  return _NotifyTray(TWM_CYCLEFOCUS, 1, 0xFFFFFFFF);
367  else
368  return _NotifyTray(TWM_CYCLEFOCUS, 1, 1);
371  break;
373  if (m_ShellView)
374  m_ShellView->Refresh();
375  break;
376  }
377 
378  return 0;
379 }
#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:760
WPARAM wParam
Definition: combotst.c:138
BOOL WINAPI SHFindFiles(PCIDLIST_ABSOLUTE pidlFolder, PCIDLIST_ABSOLUTE pidlSaveFile)
Definition: shellord.c:2234
#define VK_SHIFT
Definition: winuser.h:2177
#define FCIDM_DESKBROWSER_CLOSE
Definition: shresdef.h:757
smooth NULL
Definition: ftsmooth.c:416
#define FCIDM_DESKBROWSER_FOCUS
Definition: shresdef.h:758
SHORT WINAPI GetKeyState(_In_ int)
LRESULT _NotifyTray(UINT uMsg, WPARAM wParam, LPARAM lParam)
#define FCIDM_DESKBROWSER_SEARCH
Definition: shresdef.h:759
#define LOWORD(l)
Definition: pedump.c:82

◆ OnEraseBkgnd()

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

Definition at line 382 of file CDesktopBrowser.cpp.

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

◆ OnGetChangeNotifyServer()

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

Definition at line 445 of file CDesktopBrowser.cpp.

446 {
447  BOOL bCreate = (BOOL)wParam;
449  {
452  return NULL;
453 
456  return NULL;
457  }
459 }
HRESULT CChangeNotifyServer_CreateInstance(REFIID riid, void **ppv)
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define IID_PPV_ARG(Itype, ppType)
#define BOOL
Definition: nt_native.h:43
WPARAM wParam
Definition: combotst.c:138
unsigned int BOOL
Definition: ntddk_ex.h:94
CComPtr< IOleWindow > m_ChangeNotifyServer
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1444
LONG_PTR LRESULT
Definition: windef.h:209

◆ OnOpenNewWindow()

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

Definition at line 428 of file CDesktopBrowser.cpp.

429 {
430  TRACE("Proxy Desktop message 1035 received.\n");
432  return 0;
433 }
#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 435 of file CDesktopBrowser.cpp.

436 {
438  return 0;
439 }
HWND WINAPI SetFocus(_In_opt_ HWND)

◆ OnSettingChange()

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

Definition at line 400 of file CDesktopBrowser.cpp.

401 {
402  if (uMsg == WM_SETTINGCHANGE /* == WM_WININICHANGE */ &&
403  lstrcmpiW((LPCWSTR)lParam, L"Environment") == 0)
404  {
405  LPVOID lpEnvironment;
406  RegenerateUserEnvironment(&lpEnvironment, TRUE);
407  }
408 
409  if (m_hWndShellView)
410  {
411  /* Forward the message */
413  }
414 
415  if (uMsg == WM_SETTINGCHANGE && wParam == SPI_SETWORKAREA && m_hWndShellView != NULL)
416  {
417  _Resize();
418  }
419 
420  return 0;
421 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define TRUE
Definition: types.h:120
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 387 of file CDesktopBrowser.cpp.

388 {
389  if (wParam == SIZE_MINIMIZED)
390  {
391  /* Hey, we're the desktop!!! */
392  ::ShowWindow(m_hWnd, SW_RESTORE);
393  }
394 
396 
397  return 0;
398 }
#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 330 of file CDesktopBrowser.cpp.

331 {
332  return E_NOTIMPL;
333 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ QueryActiveShellView()

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

Implements IShellBrowser.

Definition at line 319 of file CDesktopBrowser.cpp.

320 {
321  if (ppshv == NULL)
322  return E_POINTER;
323  *ppshv = m_ShellView;
324  if (m_ShellView != NULL)
325  m_ShellView->AddRef();
326 
327  return S_OK;
328 }
CComPtr< IShellView > m_ShellView
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365

◆ QueryService()

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

Implements IServiceProvider.

Definition at line 340 of file CDesktopBrowser.cpp.

341 {
342  /* FIXME - handle guidService */
343  return QueryInterface(riid, ppv);
344 }
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 267 of file CDesktopBrowser.cpp.

268 {
269  return E_NOTIMPL;
270 }
#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 312 of file CDesktopBrowser.cpp.

313 {
314  if (pret == NULL)
315  return E_POINTER;
316  return E_NOTIMPL;
317 }
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 262 of file CDesktopBrowser.cpp.

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

◆ SetStatusTextSB()

HRESULT STDMETHODCALLTYPE CDesktopBrowser::SetStatusTextSB ( LPCOLESTR  pszStatusText)
virtual

Implements IShellBrowser.

Definition at line 272 of file CDesktopBrowser.cpp.

273 {
274  return E_NOTIMPL;
275 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetToolbarItems()

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

Implements IShellBrowser.

Definition at line 335 of file CDesktopBrowser.cpp.

336 {
337  return E_NOTIMPL;
338 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ TranslateAcceleratorSB()

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

Implements IShellBrowser.

Definition at line 282 of file CDesktopBrowser.cpp.

283 {
284  if (!::TranslateAcceleratorW(m_hWnd, m_hAccel, lpmsg))
285  return S_FALSE;
286  return S_OK;
287 }
#define S_FALSE
Definition: winerror.h:2357
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
#define S_OK
Definition: intsafe.h:51

Member Data Documentation

◆ m_ChangeNotifyServer

CComPtr<IOleWindow> CDesktopBrowser::m_ChangeNotifyServer
private

Definition at line 46 of file CDesktopBrowser.cpp.

Referenced by OnGetChangeNotifyServer().

◆ m_hAccel

HACCEL CDesktopBrowser::m_hAccel
private

Definition at line 41 of file CDesktopBrowser.cpp.

Referenced by Initialize(), and TranslateAcceleratorSB().

◆ m_hwndChangeNotifyServer

HWND CDesktopBrowser::m_hwndChangeNotifyServer
private

Definition at line 47 of file CDesktopBrowser.cpp.

Referenced by OnGetChangeNotifyServer(), and ~CDesktopBrowser().

◆ m_hWndShellView

HWND CDesktopBrowser::m_hWndShellView
private

◆ m_ShellView

CComPtr<IShellView> CDesktopBrowser::m_ShellView
private

Definition at line 44 of file CDesktopBrowser.cpp.

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

◆ m_Tray

CComPtr<IShellDesktopTray> CDesktopBrowser::m_Tray
private

Definition at line 43 of file CDesktopBrowser.cpp.

Referenced by _NotifyTray(), and Initialize().


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