ReactOS  0.4.15-dev-439-g292f67a
CDesktopBrowser.cpp
Go to the documentation of this file.
1 /*
2  * Shell Desktop
3  *
4  * Copyright 2008 Thomas Bluemel
5  * Copyright 2020 Katayama Hirofumi MZ
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21 
22 #include "shelldesktop.h"
23 
24 // Support for multiple monitors is disabled till LVM_SETWORKAREAS gets implemented
25 #ifdef MULTIMONITOR_SUPPORT
26 #include <atlcoll.h>
27 #endif
28 
30 
31 static const WCHAR szProgmanClassName[] = L"Progman";
32 static const WCHAR szProgmanWindowName[] = L"Program Manager";
33 
35  public CWindowImpl<CDesktopBrowser, CWindow, CFrameWinTraits>,
36  public CComObjectRootEx<CComMultiThreadModelNoCS>,
37  public IShellBrowser,
38  public IServiceProvider
39 {
40 private:
41  HACCEL m_hAccel;
43  CComPtr<IShellDesktopTray> m_Tray;
44  CComPtr<IShellView> m_ShellView;
45 
46  CComPtr<IOleWindow> m_ChangeNotifyServer;
48 
50  HRESULT _Resize();
51 
52 public:
55  HRESULT Initialize(IShellDesktopTray *ShellDeskx);
56 
57  // *** IOleWindow methods ***
58  virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd);
60 
61  // *** IShellBrowser methods ***
62  virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths);
63  virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject);
64  virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared);
65  virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR pszStatusText);
69  virtual HRESULT STDMETHODCALLTYPE GetViewStateStream(DWORD grfMode, IStream **ppStrm);
70  virtual HRESULT STDMETHODCALLTYPE GetControlWindow(UINT id, HWND *lphwnd);
74  virtual HRESULT STDMETHODCALLTYPE SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags);
75 
76  // *** IServiceProvider methods ***
77  virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
78 
79  // message handlers
81  LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
83  LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
85  LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
86  LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
88 
90 
101 END_MSG_MAP()
102 
105  COM_INTERFACE_ENTRY_IID(IID_IShellBrowser, IShellBrowser)
106  COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
107 END_COM_MAP()
108 };
109 
111  m_hAccel(NULL),
114 {
115 }
116 
118 {
119  if (m_ShellView.p != NULL && m_hWndShellView != NULL)
120  {
121  m_ShellView->DestroyViewWindow();
122  }
123 
125  {
127  }
128 }
129 
130 #ifdef MULTIMONITOR_SUPPORT
132  _In_ HMONITOR hMonitor,
133  _In_ HDC hdcMonitor,
134  _In_ LPRECT lprcMonitor,
136 )
137 {
138  CAtlList<RECT> *list = (CAtlList<RECT>*)dwData;
139  MONITORINFO MonitorInfo;
140  MonitorInfo.cbSize = sizeof(MonitorInfo);
141  if (::GetMonitorInfoW(hMonitor, &MonitorInfo))
142  {
143  list->AddTail(MonitorInfo.rcWork);
144  }
145 
146  return TRUE;
147 }
148 #endif
149 
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 }
195 
196 HRESULT CDesktopBrowser::Initialize(IShellDesktopTray *ShellDesk)
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 }
243 
245 {
246  if (lphwnd == NULL)
247  return E_POINTER;
248  *lphwnd = m_hWnd;
249  return S_OK;
250 }
251 
253 {
254  return E_NOTIMPL;
255 }
256 
257 HRESULT STDMETHODCALLTYPE CDesktopBrowser::InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
258 {
259  return E_NOTIMPL;
260 }
261 
262 HRESULT STDMETHODCALLTYPE CDesktopBrowser::SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject)
263 {
264  return E_NOTIMPL;
265 }
266 
268 {
269  return E_NOTIMPL;
270 }
271 
273 {
274  return E_NOTIMPL;
275 }
276 
278 {
279  return E_NOTIMPL;
280 }
281 
283 {
284  if (!::TranslateAcceleratorW(m_hWnd, m_hAccel, lpmsg))
285  return S_FALSE;
286  return S_OK;
287 }
288 
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 }
299 
301 {
302  return E_NOTIMPL;
303 }
304 
306 {
307  if (lphwnd == NULL)
308  return E_POINTER;
309  return E_NOTIMPL;
310 }
311 
313 {
314  if (pret == NULL)
315  return E_POINTER;
316  return E_NOTIMPL;
317 }
318 
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 }
329 
331 {
332  return E_NOTIMPL;
333 }
334 
336 {
337  return E_NOTIMPL;
338 }
339 
341 {
342  /* FIXME - handle guidService */
343  return QueryInterface(riid, ppv);
344 }
345 
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 }
357 
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 }
380 
381 
383 {
384  return (LRESULT)PaintDesktop((HDC)wParam);
385 }
386 
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 }
399 
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 }
422 
424 {
425  return _NotifyTray(TWM_DOEXITWINDOWS, 0, 0);
426 }
427 
429 {
430  TRACE("Proxy Desktop message 1035 received.\n");
432  return 0;
433 }
434 
436 {
438  return 0;
439 }
440 
441 // Message WM_DESKTOP_GET_CNOTIFY_SERVER: Get or create the change notification server.
442 // wParam: BOOL bCreate; The flag whether it creates or not.
443 // lParam: Ignored.
444 // return: The window handle of the server window.
446 {
447  BOOL bCreate = (BOOL)wParam;
449  {
452  return NULL;
453 
456  return NULL;
457  }
459 }
460 
461 HRESULT CDesktopBrowser_CreateInstance(IShellDesktopTray *Tray, REFIID riid, void **ppv)
462 {
463  return ShellObjectCreatorInit<CDesktopBrowser, IShellDesktopTray*>(Tray, riid, ppv);
464 }
465 
466 /*************************************************************************
467  * SHCreateDesktop [SHELL32.200]
468  *
469  */
470 HANDLE WINAPI SHCreateDesktop(IShellDesktopTray *Tray)
471 {
472  if (Tray == NULL)
473  {
475  return NULL;
476  }
477 
478  CComPtr<IShellBrowser> Browser;
480  if (FAILED_UNEXPECTEDLY(hr))
481  return NULL;
482 
483  return static_cast<HANDLE>(Browser.Detach());
484 }
485 
486 /*************************************************************************
487  * SHCreateDesktop [SHELL32.201]
488  *
489  */
491 {
492  if (hDesktop == NULL)
493  {
495  return FALSE;
496  }
497 
498  MSG Msg;
499  BOOL bRet;
500 
501  CComPtr<IShellBrowser> browser;
502  CComPtr<IShellView> shellView;
503 
504  browser.Attach(static_cast<IShellBrowser*>(hDesktop));
505  HRESULT hr = browser->QueryActiveShellView(&shellView);
506  if (FAILED_UNEXPECTEDLY(hr))
507  return FALSE;
508 
509  while ((bRet = ::GetMessageW(&Msg, NULL, 0, 0)) != 0)
510  {
511  if (bRet != -1)
512  {
513  if (shellView->TranslateAcceleratorW(&Msg) != S_OK)
514  {
517  }
518  }
519  }
520 
521  return TRUE;
522 }
#define TWM_CYCLEFOCUS
Definition: undocshell.h:57
struct @1608 Msg[]
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1608
BOOL WINAPI TranslateMessage(_In_ const MSG *)
struct _CSFV CSFV
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
#define SM_XVIRTUALSCREEN
Definition: winuser.h:1026
HRESULT CChangeNotifyServer_CreateInstance(REFIID riid, void **ppv)
LRESULT OnSettingChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
HRESULT hr
Definition: shlfolder.c:183
#define TWM_DOEXITWINDOWS
Definition: undocshell.h:56
Definition: scsiwmi.h:51
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL WINAPI IsWindow(_In_opt_ HWND)
BOOL WINAPI EnumDisplayMonitors(_In_opt_ HDC, _In_opt_ LPCRECT, _In_ MONITORENUMPROC, _In_ LPARAM)
#define SM_CMONITORS
Definition: winuser.h:1030
LRESULT OnGetChangeNotifyServer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
#define SM_CXVIRTUALSCREEN
Definition: winuser.h:1028
WINE_DEFAULT_DEBUG_CHANNEL(desktop)
#define WM_DESKTOP_GET_CNOTIFY_SERVER
LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
REFIID riid
Definition: precomp.h:44
_In_ BOOLEAN Create
Definition: pstypes.h:519
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
CComPtr< IShellView > m_ShellView
HANDLE WINAPI SHCreateDesktop(IShellDesktopTray *Tray)
Definition: shlobj.h:1201
HRESULT Initialize(IShellDesktopTray *ShellDeskx)
virtual HRESULT STDMETHODCALLTYPE EnableModelessSB(BOOL fEnable)
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
static HDC
Definition: imagelist.c:92
#define CALLBACK
Definition: compat.h:27
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
Definition: atlwin.h:1886
BOOL WINAPI UpdateWindow(_In_ HWND)
REFIID LPVOID * ppv
Definition: atlbase.h:39
LONG top
Definition: windef.h:307
static HANDLE ULONG_PTR dwData
Definition: file.c:35
HWND WINAPI SetFocus(_In_opt_ HWND)
#define COLOR_DESKTOP
Definition: winuser.h:904
static const WCHAR szProgmanClassName[]
UINT_PTR WPARAM
Definition: windef.h:207
LONG left
Definition: windef.h:306
UINT uFlags
Definition: api.c:59
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define FCIDM_DESKBROWSER_REFRESH
Definition: shresdef.h:743
Definition: fs.h:235
#define SW_RESTORE
Definition: winuser.h:773
LONG right
Definition: windef.h:308
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
#define BOOL
Definition: nt_native.h:43
BOOL WINAPI DestroyWindow(_In_ HWND)
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
WPARAM wParam
Definition: combotst.c:138
#define WM_SETTINGCHANGE
Definition: winuser.h:1611
virtual HRESULT STDMETHODCALLTYPE GetControlWindow(UINT id, HWND *lphwnd)
virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive(struct IShellView *ppshv)
BOOL CALLBACK MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, RECT *rcMonitor, LPARAM Param)
Definition: screensave.c:33
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
CComPtr< IShellDesktopTray > m_Tray
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
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
virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject)
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
unsigned int BOOL
Definition: ntddk_ex.h:94
virtual HRESULT STDMETHODCALLTYPE GetViewStateStream(DWORD grfMode, IStream **ppStrm)
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd)
#define SH_EXPLORER_CMDLINE_FLAG_E
#define S_FALSE
Definition: winerror.h:2357
BOOL WINAPI SHFindFiles(PCIDLIST_ABSOLUTE pidlFolder, PCIDLIST_ABSOLUTE pidlSaveFile)
Definition: shellord.c:2129
#define VK_SHIFT
Definition: winuser.h:2177
#define FCIDM_DESKBROWSER_CLOSE
Definition: shresdef.h:740
HACCEL WINAPI LoadAcceleratorsW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
HRESULT CDesktopBrowser_CreateInstance(IShellDesktopTray *Tray, REFIID riid, void **ppv)
LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
CComPtr< IOleWindow > m_ChangeNotifyServer
HWND hwndListView
Definition: eventvwr.c:83
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI SHCreateShellFolderViewEx(LPCSFV psvcbi, IShellView **ppsv)
Definition: CDefView.cpp:3574
LONG_PTR LPARAM
Definition: windef.h:208
#define LVM_SETWORKAREAS
Definition: commctrl.h:2778
#define SW_SHOW
Definition: winuser.h:769
#define FCIDM_DESKBROWSER_FOCUS
Definition: shresdef.h:741
#define SM_CYVIRTUALSCREEN
Definition: winuser.h:1029
SHORT WINAPI GetKeyState(_In_ int)
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
EXTERN_C BOOL WINAPI RegenerateUserEnvironment(LPVOID *lpEnvironment, BOOL bUpdateSelf)
Definition: shell32.cpp:71
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
virtual HRESULT STDMETHODCALLTYPE QueryActiveShellView(struct IShellView **ppshv)
HRESULT hres
Definition: protocol.c:465
HRESULT WINAPI SHOpenNewFrame(LPITEMIDLIST pidl, IUnknown *paramC, long param10, DWORD dwFlags)
Definition: desktopipc.cpp:578
__wchar_t WCHAR
Definition: xmlstorage.h:180
LRESULT _NotifyTray(UINT uMsg, WPARAM wParam, LPARAM lParam)
#define WM_SIZE
Definition: winuser.h:1593
LONG HRESULT
Definition: typedefs.h:78
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
#define END_MSG_MAP()
Definition: atlwin.h:1799
BOOL WINAPI SHOnCWMCommandLine(HANDLE hSharedInfo)
Definition: desktopipc.cpp:530
#define FCIDM_DESKBROWSER_SEARCH
Definition: shresdef.h:742
#define WM_CLOSE
Definition: winuser.h:1603
#define IDA_DESKBROWSER
Definition: shresdef.h:26
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define WINAPI
Definition: msvc.h:6
LRESULT OnOpenNewWindow(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
unsigned short WORD
Definition: ntddk_ex.h:93
int WINAPI GetSystemMetrics(_In_ int)
unsigned long DWORD
Definition: ntddk_ex.h:95
virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
#define SetLastError(x)
Definition: compat.h:418
#define SIZE_MINIMIZED
Definition: winuser.h:2481
HWND WINAPI FindWindowExW(_In_opt_ HWND, _In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
static const WCHAR L[]
Definition: oid.c:1250
BOOL WINAPI SHDesktopMessageLoop(HANDLE hDesktop)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared)
Definition: _list.h:228
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define CS_DBLCLKS
Definition: winuser.h:646
#define WM_COMMAND
Definition: winuser.h:1722
virtual HRESULT STDMETHODCALLTYPE BrowseObject(LPCITEMIDLIST pidl, UINT wFlags)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
virtual HRESULT STDMETHODCALLTYPE SendControlMsg(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
#define SM_YVIRTUALSCREEN
Definition: winuser.h:1027
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534
#define _In_
Definition: no_sal2.h:204
virtual HRESULT STDMETHODCALLTYPE SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define S_OK
Definition: intsafe.h:59
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1444
LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
#define fs
Definition: i386-dis.c:435
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
DWORD cbSize
Definition: winuser.h:3759
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode)
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define E_NOTIMPL
Definition: ddrawi.h:99
#define list
Definition: rosglue.h:35
#define WS_POPUP
Definition: pedump.c:616
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
#define WM_EXPLORER_OPEN_NEW_WINDOW
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1780
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1808
#define WC_LISTVIEW
Definition: commctrl.h:2255
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
const GUID IID_IOleWindow
virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR pszStatusText)
BOOL WINAPI PaintDesktop(_In_ HDC)
LONG bottom
Definition: windef.h:309
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB(MSG *pmsg, WORD wID)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define END_COM_MAP()
Definition: atlcom.h:552
#define WM_ERASEBKGND
Definition: winuser.h:1607
#define WM_SETFOCUS
Definition: winuser.h:1595
LONG_PTR LRESULT
Definition: windef.h:209
#define E_POINTER
Definition: winerror.h:2365
static const WCHAR szProgmanWindowName[]
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define SUCCEEDED(hr)
Definition: intsafe.h:57