ReactOS 0.4.15-dev-6662-g1b3eed5
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)
 
EXTERN_C BOOL WINAPI SHIsTempDisplayMode (VOID)
 

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: atlbase.h:39
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;
481 return NULL;
482
483 return static_cast<HANDLE>(Browser.Detach());
484}
HRESULT CDesktopBrowser_CreateInstance(IShellDesktopTray *Tray, REFIID riid, void **ppv)
#define NULL
Definition: types.h:112
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)

◆ 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);
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}
struct @1611 Msg[]
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define S_OK
Definition: intsafe.h:52
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)

◆ SHIsTempDisplayMode()

EXTERN_C BOOL WINAPI SHIsTempDisplayMode ( VOID  )

Definition at line 529 of file CDesktopBrowser.cpp.

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
unsigned long DWORD
Definition: ntddk_ex.h:95
static HDC
Definition: imagelist.c:92
#define TRACE(s)
Definition: solgame.cpp:4
DWORD dmPelsWidth
Definition: wingdi.h:1648
DWORD dmPelsHeight
Definition: wingdi.h:1649
WORD dmSize
Definition: wingdi.h:1620
BOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode)
Definition: display.c:408
#define ZeroMemory
Definition: winbase.h:1700
#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 ENUM_REGISTRY_SETTINGS
Definition: winuser.h:180
HDC WINAPI GetDC(_In_opt_ HWND)
#define SM_REMOTESESSION
Definition: winuser.h:1052
int WINAPI GetSystemMetrics(_In_ int)

◆ 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().