ReactOS 0.4.16-dev-321-g63bb46a
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
29#include <dbt.h>
30
32
33static const WCHAR szProgmanClassName[] = L"Progman";
34static const WCHAR szProgmanWindowName[] = L"Program Manager";
35
37 public CWindowImpl<CDesktopBrowser, CWindow, CFrameWinTraits>,
38 public CComObjectRootEx<CComMultiThreadModelNoCS>,
39 public IShellBrowser,
40 public IShellBrowserService,
41 public IServiceProvider
42{
43private:
44 HACCEL m_hAccel;
46 CComPtr<IShellDesktopTray> m_Tray;
47 CComPtr<IShellView> m_ShellView;
48
49 CComPtr<IOleWindow> m_ChangeNotifyServer;
52
55
56public:
59 HRESULT Initialize(IShellDesktopTray *ShellDeskx);
60
61 // *** IOleWindow methods ***
62 STDMETHOD(GetWindow)(HWND *lphwnd) override;
63 STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override;
64
65 // *** IShellBrowser methods ***
66 STDMETHOD(InsertMenusSB)(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) override;
67 STDMETHOD(SetMenuSB)(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject) override;
68 STDMETHOD(RemoveMenusSB)(HMENU hmenuShared) override;
69 STDMETHOD(SetStatusTextSB)(LPCOLESTR pszStatusText) override;
70 STDMETHOD(EnableModelessSB)(BOOL fEnable) override;
71 STDMETHOD(TranslateAcceleratorSB)(MSG *pmsg, WORD wID) override;
73 STDMETHOD(GetViewStateStream)(DWORD grfMode, IStream **ppStrm) override;
74 STDMETHOD(GetControlWindow)(UINT id, HWND *lphwnd) override;
76 STDMETHOD(QueryActiveShellView)(struct IShellView **ppshv) override;
77 STDMETHOD(OnViewWindowActive)(struct IShellView *ppshv) override;
78 STDMETHOD(SetToolbarItems)(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags) override;
79
80 // *** IShellBrowserService methods ***
81 STDMETHOD(GetPropertyBag)(long flags, REFIID riid, void **ppv) override;
82
83 // *** IBrowserService2 methods (fake for now) ***
84 inline void SetTopBrowser() const {}
85
86 // *** IServiceProvider methods ***
87 STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override;
88
89 // message handlers
91 LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
93 LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
101
103
118
121 COM_INTERFACE_ENTRY_IID(IID_IShellBrowser, IShellBrowser)
122 COM_INTERFACE_ENTRY_IID(IID_IShellBrowserService, IShellBrowserService)
123 COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
125};
126
128 m_hAccel(NULL),
132{
134}
135
137{
139 {
140 m_ShellView->DestroyViewWindow();
141 }
142
144 {
146 }
147}
148
149#ifdef MULTIMONITOR_SUPPORT
151 _In_ HMONITOR hMonitor,
152 _In_ HDC hdcMonitor,
153 _In_ LPRECT lprcMonitor,
155)
156{
157 CAtlList<RECT> *list = (CAtlList<RECT>*)dwData;
158 MONITORINFO MonitorInfo;
159 MonitorInfo.cbSize = sizeof(MonitorInfo);
160 if (::GetMonitorInfoW(hMonitor, &MonitorInfo))
161 {
162 list->AddTail(MonitorInfo.rcWork);
163 }
164
165 return TRUE;
166}
167#endif
168
170{
171 RECT rcNewSize;
172
173#ifdef MULTIMONITOR_SUPPORT
174
176 if (cMonitors == 1)
177 {
178 SystemParametersInfoW(SPI_GETWORKAREA, 0, &rcNewSize, 0);
179 }
180 else
181 {
182 SetRect(&rcNewSize,
187 }
188
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 if (cMonitors != 1)
193 {
194 CAtlList<RECT> list;
196 RECT* prcWorkAreas = new RECT[list.GetCount()];
197 int i = 0;
198 for (POSITION it = list.GetHeadPosition(); it; list.GetNext(it))
199 prcWorkAreas[i++] = list.GetAt(it);
200
202
204 }
205
206#else
207 SystemParametersInfoW(SPI_GETWORKAREA, 0, &rcNewSize, 0);
208 ::MoveWindow(m_hWnd, rcNewSize.left, rcNewSize.top, rcNewSize.right - rcNewSize.left, rcNewSize.bottom - rcNewSize.top, TRUE);
209 ::MoveWindow(m_hWndShellView, 0, 0, rcNewSize.right - rcNewSize.left, rcNewSize.bottom - rcNewSize.top, TRUE);
210
211#endif
212 return S_OK;
213}
214
215HRESULT CDesktopBrowser::Initialize(IShellDesktopTray *ShellDesk)
216{
217 CComPtr<IShellFolder> psfDesktop;
218 HRESULT hRet;
219 hRet = SHGetDesktopFolder(&psfDesktop);
220 if (FAILED_UNEXPECTEDLY(hRet))
221 return hRet;
222
223 m_Tray = ShellDesk;
224
226 if (!m_hWnd)
227 return E_FAIL;
228
229 hRet = psfDesktop->CreateViewObject(m_hWnd, IID_PPV_ARG(IShellView, &m_ShellView));
230 if (FAILED_UNEXPECTEDLY(hRet))
231 return hRet;
232
233 m_Tray->RegisterDesktopWindow(m_hWnd);
234 if (FAILED_UNEXPECTEDLY(hRet))
235 return hRet;
236
237 BOOL fHideIcons = SHELL_GetSetting(SSF_HIDEICONS, fHideIcons);
239 RECT rcShellView = {0,0,0,0};
240 fs.ViewMode = FVM_ICON;
242 FWF_AUTOARRANGE | (fHideIcons ? FWF_NOICONS : 0);
243 hRet = m_ShellView->CreateViewWindow(NULL, &fs, (IShellBrowser *)this, &rcShellView, &m_hWndShellView);
244 if (FAILED_UNEXPECTEDLY(hRet))
245 return hRet;
246
247 _Resize();
248
250
252
253#if 1
254 /* A Windows8+ specific hack */
257#endif
259 UpdateWindow();
260
261 return hRet;
262}
263
265{
266 if (lphwnd == NULL)
267 return E_POINTER;
268 *lphwnd = m_hWnd;
269 return S_OK;
270}
271
273{
274 return E_NOTIMPL;
275}
276
277HRESULT STDMETHODCALLTYPE CDesktopBrowser::InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
278{
279 return E_NOTIMPL;
280}
281
282HRESULT STDMETHODCALLTYPE CDesktopBrowser::SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject)
283{
284 return E_NOTIMPL;
285}
286
288{
289 return E_NOTIMPL;
290}
291
293{
294 return E_NOTIMPL;
295}
296
298{
299 return E_NOTIMPL;
300}
301
303{
304 if (!::TranslateAcceleratorW(m_hWnd, m_hAccel, lpmsg))
305 return S_FALSE;
306 return S_OK;
307}
308
310{
311 /*
312 * We should use IShellWindows interface here in order to attempt to
313 * find an open shell window that shows the requested pidl and activate it
314 */
315
316 DWORD dwFlags = ((wFlags & SBSP_EXPLOREMODE) != 0) ? SH_EXPLORER_CMDLINE_FLAG_E : 0;
317 return SHOpenNewFrame(ILClone(pidl), NULL, 0, dwFlags);
318}
319
321{
322 return E_NOTIMPL;
323}
324
326{
327 if (lphwnd == NULL)
328 return E_POINTER;
329 return E_NOTIMPL;
330}
331
333{
334 if (pret == NULL)
335 return E_POINTER;
336 return E_NOTIMPL;
337}
338
340{
341 if (ppshv == NULL)
342 return E_POINTER;
343 *ppshv = m_ShellView;
344 if (*ppshv != NULL)
345 (*ppshv)->AddRef();
346
347 return S_OK;
348}
349
351{
352 return E_NOTIMPL;
353}
354
356{
357 return E_NOTIMPL;
358}
359
361{
362 ITEMIDLIST deskpidl = {};
363 return SHGetViewStatePropertyBag(&deskpidl, L"Desktop", flags | SHGVSPB_ROAM, riid, ppv);
364}
365
367{
368 /* FIXME - handle guidService (SID_STopLevelBrowser for IShellBrowserService etc) */
369 return QueryInterface(riid, ppv);
370}
371
373{
374 HWND hWndTray;
375 HRESULT hRet;
376
377 hRet = m_Tray->GetTrayWindow(&hWndTray);
378 if (SUCCEEDED(hRet))
379 ::PostMessageW(hWndTray, uMsg, wParam, lParam);
380
381 return 0;
382}
383
385{
386 switch (LOWORD(wParam))
387 {
389 return _NotifyTray(TWM_DOEXITWINDOWS, 0, 0);
392 return _NotifyTray(TWM_CYCLEFOCUS, 1, 0xFFFFFFFF);
393 else
394 return _NotifyTray(TWM_CYCLEFOCUS, 1, 1);
397 break;
399 if (m_ShellView)
400 m_ShellView->Refresh();
401 break;
402 }
403
404 return 0;
405}
406
407
409{
410 return (LRESULT)PaintDesktop((HDC)wParam);
411}
412
414{
415 if (wParam == SIZE_MINIMIZED)
416 {
417 /* Hey, we're the desktop!!! */
418 ::ShowWindow(m_hWnd, SW_RESTORE);
419 }
420
422
423 return 0;
424}
425
427{
428 if (uMsg == WM_SETTINGCHANGE /* == WM_WININICHANGE */ &&
429 lstrcmpiW((LPCWSTR)lParam, L"Environment") == 0)
430 {
431 LPVOID lpEnvironment;
432 RegenerateUserEnvironment(&lpEnvironment, TRUE);
433 }
434
435 if (m_hWndShellView)
436 {
437 /* Forward the message */
439 }
440
441 if (uMsg == WM_SETTINGCHANGE && wParam == SPI_SETWORKAREA && m_hWndShellView != NULL)
442 {
443 _Resize();
444 }
445
446 return 0;
447}
448
450{
451 return _NotifyTray(TWM_DOEXITWINDOWS, 0, 0);
452}
453
455{
456 TRACE("Proxy Desktop message 1035 received.\n");
458 return 0;
459}
460
462{
464 return 0;
465}
466
467// Message WM_DESKTOP_GET_CNOTIFY_SERVER: Get or create the change notification server.
468// wParam: BOOL bCreate; The flag whether it creates or not.
469// lParam: Ignored.
470// return: The window handle of the server window.
472{
475 {
478 return NULL;
479
482 return NULL;
483 }
485}
486
487// Detect DBT_DEVICEARRIVAL and DBT_DEVICEREMOVECOMPLETE
489{
491 return 0;
492
493 DWORD dwDrives = ::GetLogicalDrives();
494 for (INT iDrive = 0; iDrive <= 'Z' - 'A'; ++iDrive)
495 {
497 DWORD dwBit = (1 << iDrive);
498 if (!(m_dwDrives & dwBit) && (dwDrives & dwBit)) // The drive is added
499 {
500 PathBuildRootW(szPath, iDrive);
502 }
503 else if ((m_dwDrives & dwBit) && !(dwDrives & dwBit)) // The drive is removed
504 {
505 PathBuildRootW(szPath, iDrive);
507 }
508 }
509
510 m_dwDrives = dwDrives;
511 return 0;
512}
513
515
517{
518 switch (wParam)
519 {
520 case 0:
521#if (NTDDI_VERSION >= NTDDI_VISTA)
522 case 2:
523 case 7:
524#endif
526 break;
527 case 1:
529 break;
530 }
531 return 0;
532}
533
535{
537 m_ShellView->SaveViewState();
538 return 0;
539}
540
541HRESULT CDesktopBrowser_CreateInstance(IShellDesktopTray *Tray, REFIID riid, void **ppv)
542{
543 return ShellObjectCreatorInit<CDesktopBrowser, IShellDesktopTray*>(Tray, riid, ppv);
544}
545
546/*************************************************************************
547 * SHCreateDesktop [SHELL32.200]
548 *
549 */
550HANDLE WINAPI SHCreateDesktop(IShellDesktopTray *Tray)
551{
552 if (Tray == NULL)
553 {
555 return NULL;
556 }
557
558 CComPtr<IShellBrowser> Browser;
561 return NULL;
562
563 return static_cast<HANDLE>(Browser.Detach());
564}
565
566/*************************************************************************
567 * SHCreateDesktop [SHELL32.201]
568 *
569 */
571{
572 if (hDesktop == NULL)
573 {
575 return FALSE;
576 }
577
578 MSG Msg;
579 BOOL bRet;
580
581 CComPtr<IShellBrowser> browser;
582 CComPtr<IShellView> shellView;
583
584 browser.Attach(static_cast<IShellBrowser*>(hDesktop));
585 HRESULT hr = browser->QueryActiveShellView(&shellView);
587 return FALSE;
588
589 while ((bRet = ::GetMessageW(&Msg, NULL, 0, 0)) != 0)
590 {
591 if (bRet != -1)
592 {
593 if (shellView->TranslateAcceleratorW(&Msg) != S_OK)
594 {
597 }
598 }
599 }
600
601 return TRUE;
602}
603
604/*************************************************************************
605 * SHIsTempDisplayMode [SHELL32.724]
606 *
607 * Is the current display settings temporary?
608 */
610{
611 TRACE("\n");
612
613 if (GetSystemMetrics(SM_REMOTESESSION) || GetSystemMetrics(SM_REMOTECONTROL))
614 return FALSE;
615
616 DEVMODEW DevMode;
617 ZeroMemory(&DevMode, sizeof(DevMode));
618 DevMode.dmSize = sizeof(DevMode);
619
621 return FALSE;
622
623 if (!DevMode.dmPelsWidth || !DevMode.dmPelsHeight)
624 return FALSE;
625
626 HDC hDC = GetDC(NULL);
627 DWORD cxWidth = GetDeviceCaps(hDC, HORZRES);
628 DWORD cyHeight = GetDeviceCaps(hDC, VERTRES);
630
631 return (cxWidth != DevMode.dmPelsWidth || cyHeight != DevMode.dmPelsHeight);
632}
static HDC hDC
Definition: 3dtext.c:33
HRESULT CChangeNotifyServer_CreateInstance(REFIID riid, void **ppv)
#define WM_DESKTOP_GET_CNOTIFY_SERVER
BOOL WINAPI SHDesktopMessageLoop(HANDLE hDesktop)
VOID WINAPI ShowFolderOptionsDialog(UINT Page, BOOL Async)
Definition: misc.cpp:265
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 STDMETHOD(m)
Definition: basetyps.h:62
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
#define WM_EXPLORER_OPEN_NEW_WINDOW
#define SH_EXPLORER_CMDLINE_FLAG_E
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
STDMETHOD() QueryService(REFGUID guidService, REFIID riid, void **ppvObject) override
STDMETHOD() RemoveMenusSB(HMENU hmenuShared) override
CComPtr< IShellView > m_ShellView
CComPtr< IOleWindow > m_ChangeNotifyServer
STDMETHOD() EnableModelessSB(BOOL fEnable) override
STDMETHOD() GetWindow(HWND *lphwnd) override
STDMETHOD() SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags) override
STDMETHOD() TranslateAcceleratorSB(MSG *pmsg, WORD wID) override
void SetTopBrowser() const
LRESULT OnSaveState(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHOD() GetViewStateStream(DWORD grfMode, IStream **ppStrm) override
HRESULT Initialize(IShellDesktopTray *ShellDeskx)
LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnGetChangeNotifyServer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
CComPtr< IShellDesktopTray > m_Tray
LRESULT OnOpenNewWindow(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHOD() InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) override
STDMETHOD() SendControlMsg(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret) override
STDMETHOD() SetStatusTextSB(LPCOLESTR pszStatusText) override
STDMETHOD() GetPropertyBag(long flags, REFIID riid, void **ppv) override
LRESULT OnShowOptionsDlg(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHOD() ContextSensitiveHelp(BOOL fEnterMode) override
STDMETHOD() SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject) override
STDMETHOD() BrowseObject(LPCITEMIDLIST pidl, UINT wFlags) override
LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHOD() OnViewWindowActive(struct IShellView *ppshv) override
LRESULT OnDeviceChange(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)
STDMETHOD() QueryActiveShellView(struct IShellView **ppshv) override
LRESULT _NotifyTray(UINT uMsg, WPARAM wParam, LPARAM lParam)
STDMETHOD() GetControlWindow(UINT id, HWND *lphwnd) override
Definition: list.h:37
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
struct @1642 Msg[]
#define DBT_DEVICEARRIVAL
Definition: dbt.h:12
#define DBT_DEVICEREMOVECOMPLETE
Definition: dbt.h:16
#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:591
BOOL WINAPI SHOnCWMCommandLine(HANDLE hSharedInfo)
Definition: desktopipc.cpp:537
#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 MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4262
HRESULT WINAPI SHGetViewStatePropertyBag(LPCITEMIDLIST pidl, LPWSTR bag_name, DWORD flags, REFIID riid, void **ppv)
Definition: ordinal.c:5222
LPWSTR WINAPI PathBuildRootW(LPWSTR lpszPath, int drive)
Definition: path.c:348
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
GLbitfield flags
Definition: glext.h:7161
GLuint id
Definition: glext.h:5910
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
LPCWSTR szPath
Definition: env.c:37
static HDC
Definition: imagelist.c:88
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
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
#define _In_
Definition: no_sal2.h:158
#define BOOL
Definition: nt_native.h:43
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
Definition: mm.h:1306
#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:237
#define LVM_SETWORKAREAS
Definition: commctrl.h:2787
#define WC_LISTVIEW
Definition: commctrl.h:2264
#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:2467
#define SHELL_GetSetting(pss, ssf, field)
Definition: shellutils.h:826
HRESULT hr
Definition: shlfolder.c:183
#define SHCNE_DRIVEREMOVED
Definition: shlobj.h:1897
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1520
#define SHCNE_DRIVEADD
Definition: shlobj.h:1898
#define SHCNF_PATHW
Definition: shlobj.h:1925
@ REST_NOSAVESET
Definition: shlobj.h:1645
#define SSF_HIDEICONS
Definition: shlobj.h:1617
@ FWF_AUTOARRANGE
Definition: shobjidl.idl:642
@ FWF_NOSCROLL
Definition: shobjidl.idl:652
@ FWF_NOCLIENTEDGE
Definition: shobjidl.idl:651
@ FWF_NOICONS
Definition: shobjidl.idl:654
@ FWF_TRANSPARENT
Definition: shobjidl.idl:650
@ FWF_DESKTOP
Definition: shobjidl.idl:647
@ FVM_ICON
Definition: shobjidl.idl:679
DWORD WINAPI SHRestricted(RESTRICTIONS rest)
Definition: shpolicy.c:150
#define IDA_DESKBROWSER
Definition: shresdef.h:27
#define FCIDM_DESKBROWSER_FOCUS
Definition: shresdef.h:819
#define FCIDM_DESKBROWSER_SEARCH
Definition: shresdef.h:820
#define FCIDM_DESKBROWSER_CLOSE
Definition: shresdef.h:818
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define TRACE(s)
Definition: solgame.cpp:4
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:3787
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
int32_t INT
Definition: typedefs.h:58
#define TRAYCMD_TASKBAR_PROPERTIES
Definition: undocshell.h:869
#define TWM_CYCLEFOCUS
Definition: undocshell.h:55
#define TWM_DOEXITWINDOWS
Definition: undocshell.h:54
#define WM_PROGMAN_SAVESTATE
Definition: undocshell.h:61
#define WM_PROGMAN_OPENSHELLSETTINGS
Definition: undocshell.h:60
BOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode)
Definition: display.c:408
#define ZeroMemory
Definition: winbase.h:1737
DWORD WINAPI GetLogicalDrives(void)
Definition: disk.c:110
_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:1628
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_CLOSE
Definition: winuser.h:1624
#define SM_CYVIRTUALSCREEN
Definition: winuser.h:1042
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:1614
#define WM_COMMAND
Definition: winuser.h:1743
#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:1616
BOOL WINAPI EnumDisplayMonitors(_In_opt_ HDC, _In_opt_ LPCRECT, _In_ MONITORENUMPROC, _In_ LPARAM)
#define SIZE_MINIMIZED
Definition: winuser.h:2509
#define CS_DBLCLKS
Definition: winuser.h:651
#define WM_DEVICECHANGE
Definition: winuser.h:1814
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1629
#define SM_CXVIRTUALSCREEN
Definition: winuser.h:1041
#define WM_SETTINGCHANGE
Definition: winuser.h:1632
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:917
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:782
#define VK_SHIFT
Definition: winuser.h:2205
#define SW_SHOW
Definition: winuser.h:778
#define SM_REMOTESESSION
Definition: winuser.h:1061
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
#define SM_XVIRTUALSCREEN
Definition: winuser.h:1039
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SM_CMONITORS
Definition: winuser.h:1043
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:1040
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