ReactOS  0.4.15-dev-3175-g222acf5
CDesktopBrowser.cpp File Reference
#include "shelldesktop.h"
Include dependency graph for CDesktopBrowser.cpp:

Go to the source code of this file.

Classes

class  CDesktopBrowser
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (desktop)
 
HRESULT CDesktopBrowser_CreateInstance (IShellDesktopTray *Tray, REFIID riid, void **ppv)
 
HANDLE WINAPI SHCreateDesktop (IShellDesktopTray *Tray)
 
BOOL WINAPI SHDesktopMessageLoop (HANDLE hDesktop)
 

Variables

static const WCHAR szProgmanClassName [] = L"Progman"
 
static const WCHAR szProgmanWindowName [] = L"Program Manager"
 

Function Documentation

◆ CDesktopBrowser_CreateInstance()

HRESULT CDesktopBrowser_CreateInstance ( IShellDesktopTray *  Tray,
REFIID  riid,
void **  ppv 
)

Definition at line 461 of file CDesktopBrowser.cpp.

462 {
463  return ShellObjectCreatorInit<CDesktopBrowser, IShellDesktopTray*>(Tray, riid, ppv);
464 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39

Referenced by SHCreateDesktop().

◆ SHCreateDesktop()

HANDLE WINAPI SHCreateDesktop ( IShellDesktopTray *  Tray)

Definition at line 470 of file CDesktopBrowser.cpp.

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 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)
HRESULT CDesktopBrowser_CreateInstance(IShellDesktopTray *Tray, REFIID riid, void **ppv)
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
#define SetLastError(x)
Definition: compat.h:611
#define NULL
Definition: types.h:112

◆ SHDesktopMessageLoop()

BOOL WINAPI SHDesktopMessageLoop ( HANDLE  hDesktop)

Definition at line 490 of file CDesktopBrowser.cpp.

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 ERROR_INVALID_PARAMETER
Definition: compat.h:101
BOOL WINAPI TranslateMessage(_In_ const MSG *)
HRESULT hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define FALSE
Definition: types.h:117
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
#define SetLastError(x)
Definition: compat.h:611
struct @1586 Msg[]
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( desktop  )

Variable Documentation

◆ szProgmanClassName

const WCHAR szProgmanClassName[] = L"Progman"
static

Definition at line 31 of file CDesktopBrowser.cpp.

◆ szProgmanWindowName

const WCHAR szProgmanWindowName[] = L"Program Manager"
static

Definition at line 32 of file CDesktopBrowser.cpp.

Referenced by CDesktopBrowser::Initialize().