ReactOS 0.4.15-dev-6694-g4ba8af9
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
31static const WCHAR szProgmanClassName[] = L"Progman";
32static const WCHAR szProgmanWindowName[] = L"Program Manager";
33
35 public CWindowImpl<CDesktopBrowser, CWindow, CFrameWinTraits>,
36 public CComObjectRootEx<CComMultiThreadModelNoCS>,
37 public IShellBrowser,
38 public IServiceProvider
39{
40private:
41 HACCEL m_hAccel;
43 CComPtr<IShellDesktopTray> m_Tray;
44 CComPtr<IShellView> m_ShellView;
45
46 CComPtr<IOleWindow> m_ChangeNotifyServer;
48
51
52public:
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);
75
76 // *** IServiceProvider methods ***
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);
88
90
102
105 COM_INTERFACE_ENTRY_IID(IID_IShellBrowser, IShellBrowser)
106 COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
108};
109
111 m_hAccel(NULL),
114{
115}
116
118{
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
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
196HRESULT 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};
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
257HRESULT STDMETHODCALLTYPE CDesktopBrowser::InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
258{
259 return E_NOTIMPL;
260}
261
262HRESULT 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 (*ppshv != NULL)
325 (*ppshv)->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);
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{
449 {
452 return NULL;
453
456 return NULL;
457 }
459}
460
461HRESULT 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 */
470HANDLE WINAPI SHCreateDesktop(IShellDesktopTray *Tray)
471{
472 if (Tray == NULL)
473 {
475 return NULL;
476 }
477
478 CComPtr<IShellBrowser> Browser;
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);
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}
523
524/*************************************************************************
525 * SHIsTempDisplayMode [SHELL32.724]
526 *
527 * Is the current display settings temporary?
528 */
530{
531 TRACE("\n");
532
533 if (GetSystemMetrics(SM_REMOTESESSION) || GetSystemMetrics(SM_REMOTECONTROL))
534 return FALSE;
535
536 DEVMODEW DevMode;
537 ZeroMemory(&DevMode, sizeof(DevMode));
538 DevMode.dmSize = sizeof(DevMode);
539
541 return FALSE;
542
543 if (!DevMode.dmPelsWidth || !DevMode.dmPelsHeight)
544 return FALSE;
545
546 HDC hDC = GetDC(NULL);
547 DWORD cxWidth = GetDeviceCaps(hDC, HORZRES);
548 DWORD cyHeight = GetDeviceCaps(hDC, VERTRES);
550
551 return (cxWidth != DevMode.dmPelsWidth || cyHeight != DevMode.dmPelsHeight);
552}
static HDC hDC
Definition: 3dtext.c:33
HRESULT CChangeNotifyServer_CreateInstance(REFIID riid, void **ppv)
#define WM_DESKTOP_GET_CNOTIFY_SERVER
HRESULT WINAPI SHCreateShellFolderViewEx(LPCSFV psvcbi, IShellView **ppsv)
Definition: CDefView.cpp:3955
BOOL WINAPI SHDesktopMessageLoop(HANDLE hDesktop)
EXTERN_C BOOL WINAPI SHIsTempDisplayMode(VOID)
HRESULT CDesktopBrowser_CreateInstance(IShellDesktopTray *Tray, REFIID riid, void **ppv)
static const WCHAR szProgmanClassName[]
static const WCHAR szProgmanWindowName[]
HANDLE WINAPI SHCreateDesktop(IShellDesktopTray *Tray)
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
#define shell32_hInstance
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
@ Create
Definition: registry.c:563
#define EXTERN_C
Definition: basetyps.h:12
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
#define WM_EXPLORER_OPEN_NEW_WINDOW
#define SH_EXPLORER_CMDLINE_FLAG_E
CComPtr< IShellView > m_ShellView
virtual HRESULT STDMETHODCALLTYPE GetControlWindow(UINT id, HWND *lphwnd)
CComPtr< IOleWindow > m_ChangeNotifyServer
virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared)
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)
virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR pszStatusText)
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB(MSG *pmsg, WORD wID)
HRESULT Initialize(IShellDesktopTray *ShellDeskx)
LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnGetChangeNotifyServer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive(struct IShellView *ppshv)
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
CComPtr< IShellDesktopTray > m_Tray
LRESULT OnOpenNewWindow(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode)
virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject)
virtual HRESULT STDMETHODCALLTYPE GetViewStateStream(DWORD grfMode, IStream **ppStrm)
virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
virtual HRESULT STDMETHODCALLTYPE SendControlMsg(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd)
LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
virtual HRESULT STDMETHODCALLTYPE BrowseObject(LPCITEMIDLIST pidl, UINT wFlags)
LRESULT OnSettingChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
virtual HRESULT STDMETHODCALLTYPE EnableModelessSB(BOOL fEnable)
LRESULT _NotifyTray(UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual HRESULT STDMETHODCALLTYPE QueryActiveShellView(struct IShellView **ppshv)
Definition: list.h:37
struct @1611 Msg[]
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
HRESULT WINAPI SHOpenNewFrame(LPITEMIDLIST pidl, IUnknown *paramC, long param10, DWORD dwFlags)
Definition: desktopipc.cpp:578
BOOL WINAPI SHOnCWMCommandLine(HANDLE hSharedInfo)
Definition: desktopipc.cpp:524
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define FCIDM_DESKBROWSER_REFRESH
Definition: desktop.c:14
UINT uFlags
Definition: api.c:59
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define CALLBACK
Definition: compat.h:35
HWND hwndListView
Definition: eventvwr.c:66
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
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
#define fs
Definition: i386-dis.c:444
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define END_COM_MAP()
Definition: atlcom.h:592
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1926
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1898
#define END_MSG_MAP()
Definition: atlwin.h:1917
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
Definition: atlwin.h:2004
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
static HDC
Definition: imagelist.c:92
HRESULT hres
Definition: protocol.c:465
static HANDLE ULONG_PTR dwData
Definition: file.c:35
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define _In_
Definition: ms_sal.h:308
unsigned int UINT
Definition: ndis.h:50
#define BOOL
Definition: nt_native.h:43
#define L(x)
Definition: ntvdm.h:50
const GUID IID_IOleWindow
#define LOWORD(l)
Definition: pedump.c:82
#define WS_POPUP
Definition: pedump.c:616
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
#define LVM_SETWORKAREAS
Definition: commctrl.h:2782
#define WC_LISTVIEW
Definition: commctrl.h:2259
#define REFIID
Definition: guiddef.h:118
#define list
Definition: rosglue.h:35
BOOL CALLBACK MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, RECT *rcMonitor, LPARAM Param)
Definition: screensave.c:33
EXTERN_C BOOL WINAPI RegenerateUserEnvironment(LPVOID *lpEnvironment, BOOL bUpdateSelf)
Definition: shell32.cpp:71
BOOL WINAPI SHFindFiles(PCIDLIST_ABSOLUTE pidlFolder, PCIDLIST_ABSOLUTE pidlSaveFile)
Definition: shellord.c:2222
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
HRESULT hr
Definition: shlfolder.c:183
struct _CSFV CSFV
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1449
@ FWF_NOSCROLL
Definition: shobjidl.idl:641
@ FWF_NOCLIENTEDGE
Definition: shobjidl.idl:640
@ FWF_TRANSPARENT
Definition: shobjidl.idl:639
@ FWF_DESKTOP
Definition: shobjidl.idl:636
@ FVM_ICON
Definition: shobjidl.idl:668
#define IDA_DESKBROWSER
Definition: shresdef.h:27
#define FCIDM_DESKBROWSER_FOCUS
Definition: shresdef.h:800
#define FCIDM_DESKBROWSER_SEARCH
Definition: shresdef.h:801
#define FCIDM_DESKBROWSER_CLOSE
Definition: shresdef.h:799
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define TRACE(s)
Definition: solgame.cpp:4
Definition: shlobj.h:1206
Definition: scsiwmi.h:51
DWORD dmPelsWidth
Definition: wingdi.h:1648
DWORD dmPelsHeight
Definition: wingdi.h:1649
WORD dmSize
Definition: wingdi.h:1620
Definition: ffs.h:70
DWORD cbSize
Definition: winuser.h:3774
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define TWM_CYCLEFOCUS
Definition: undocshell.h:57
#define TWM_DOEXITWINDOWS
Definition: undocshell.h:56
BOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode)
Definition: display.c:408
#define ZeroMemory
Definition: winbase.h:1700
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_POINTER
Definition: winerror.h:2365
#define HORZRES
Definition: wingdi.h:716
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define VERTRES
Definition: wingdi.h:717
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_ERASEBKGND
Definition: winuser.h:1615
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_CLOSE
Definition: winuser.h:1611
#define SM_CYVIRTUALSCREEN
Definition: winuser.h:1033
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SIZE
Definition: winuser.h:1601
#define WM_COMMAND
Definition: winuser.h:1730
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
BOOL WINAPI PaintDesktop(_In_ HDC)
#define ENUM_REGISTRY_SETTINGS
Definition: winuser.h:180
#define WM_SETFOCUS
Definition: winuser.h:1603
BOOL WINAPI EnumDisplayMonitors(_In_opt_ HDC, _In_opt_ LPCRECT, _In_ MONITORENUMPROC, _In_ LPARAM)
#define SIZE_MINIMIZED
Definition: winuser.h:2496
#define CS_DBLCLKS
Definition: winuser.h:646
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1616
#define SM_CXVIRTUALSCREEN
Definition: winuser.h:1032
#define WM_SETTINGCHANGE
Definition: winuser.h:1619
HWND WINAPI FindWindowExW(_In_opt_ HWND, _In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
HWND WINAPI SetFocus(_In_opt_ HWND)
#define COLOR_DESKTOP
Definition: winuser.h:908
BOOL WINAPI UpdateWindow(_In_ HWND)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
HACCEL WINAPI LoadAcceleratorsW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
#define SW_RESTORE
Definition: winuser.h:773
#define VK_SHIFT
Definition: winuser.h:2192
#define SW_SHOW
Definition: winuser.h:769
#define SM_REMOTESESSION
Definition: winuser.h:1052
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
#define SM_XVIRTUALSCREEN
Definition: winuser.h:1030
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SM_CMONITORS
Definition: winuser.h:1034
BOOL WINAPI DestroyWindow(_In_ HWND)
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SM_YVIRTUALSCREEN
Definition: winuser.h:1031
SHORT WINAPI GetKeyState(_In_ int)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
static void Initialize()
Definition: xlate.c:212
#define IID_PPV_ARG(Itype, ppType)
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185