ReactOS 0.4.15-dev-8621-g4b051b9
CDesktopBrowser.cpp File Reference
#include "shelldesktop.h"
#include <dbt.h>
Include dependency graph for CDesktopBrowser.cpp:

Go to the source code of this file.

Classes

class  CDesktopBrowser
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (desktop)
 
VOID WINAPI ShowFolderOptionsDialog (UINT Page, BOOL Async)
 
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 541 of file CDesktopBrowser.cpp.

542{
543 return ShellObjectCreatorInit<CDesktopBrowser, IShellDesktopTray*>(Tray, riid, ppv);
544}
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 550 of file CDesktopBrowser.cpp.

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}
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: precomp.h:121
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)

◆ SHDesktopMessageLoop()

BOOL WINAPI SHDesktopMessageLoop ( HANDLE  hDesktop)

Definition at line 570 of file CDesktopBrowser.cpp.

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}
struct @1636 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 609 of file CDesktopBrowser.cpp.

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
unsigned long DWORD
Definition: ntddk_ex.h:95
static HDC
Definition: imagelist.c:88
#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:1712
#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:1061
int WINAPI GetSystemMetrics(_In_ int)

◆ ShowFolderOptionsDialog()

VOID WINAPI ShowFolderOptionsDialog ( UINT  Page,
BOOL  Async 
)

Definition at line 265 of file misc.cpp.

266{
267 char buf[MAX_PATH];
268 wsprintfA(buf, "rundll32.exe shell32.dll,Options_RunDLL %u", Page);
270}
#define MAX_PATH
Definition: compat.h:34
UINT WINAPI DECLSPEC_HOTPATCH WinExec(LPCSTR lpCmdLine, UINT uCmdShow)
Definition: proc.c:4773
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
Definition: mm.h:1306
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)
#define SW_SHOW
Definition: winuser.h:778

Referenced by CDesktopBrowser::OnShowOptionsDlg(), and Options_RunDLLCommon().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( desktop  )

Variable Documentation

◆ szProgmanClassName

const WCHAR szProgmanClassName[] = L"Progman"
static

Definition at line 33 of file CDesktopBrowser.cpp.

◆ szProgmanWindowName

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

Definition at line 34 of file CDesktopBrowser.cpp.

Referenced by CDesktopBrowser::Initialize().