ReactOS 0.4.16-dev-1946-g52006dd
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)
 
static BOOL IsDesktopBrowserForwardShellViewCmd (WORD Cmd)
 
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 554 of file CDesktopBrowser.cpp.

555{
556 return ShellObjectCreatorInit<CDesktopBrowser, IShellDesktopTray*>(Tray, riid, ppv);
557}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39

Referenced by SHCreateDesktop().

◆ IsDesktopBrowserForwardShellViewCmd()

static BOOL IsDesktopBrowserForwardShellViewCmd ( WORD  Cmd)
static

Definition at line 36 of file CDesktopBrowser.cpp.

37{
38 // Note: The normal CShellBrowser forwards the entire FCIDM_SHVIEWFIRST..LAST range, we do not.
39 // Note: Windows allows FCIDM_SHVIEW_SHOWINGROUPS but we don't support it nor does it make sense.
43}
@ Cmd
Definition: sacdrv.h:278
#define FCIDM_SHVIEW_ARRANGE_AUTO
Definition: shlobj_undoc.h:67
#define FCIDM_SHVIEW_ARRANGE_AUTOGRID
Definition: shlobj_undoc.h:70
#define FCIDM_SHVIEW_DESELECTALL
Definition: shlobj_undoc.h:66
#define FCIDM_SHVIEW_REFRESH
Definition: shresdef.h:897
#define FCIDM_SHVIEW_CREATELINK
Definition: shresdef.h:867

Referenced by CDesktopBrowser::OnCommand().

◆ SHCreateDesktop()

HANDLE WINAPI SHCreateDesktop ( IShellDesktopTray *  Tray)

Definition at line 563 of file CDesktopBrowser.cpp.

564{
565 if (Tray == NULL)
566 {
568 return NULL;
569 }
570
571 CComPtr<IShellBrowser> Browser;
574 return NULL;
575
576 return static_cast<HANDLE>(Browser.Detach());
577}
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
Definition: utils.cpp:30
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)

◆ SHDesktopMessageLoop()

BOOL WINAPI SHDesktopMessageLoop ( HANDLE  hDesktop)

Definition at line 583 of file CDesktopBrowser.cpp.

584{
585 if (hDesktop == NULL)
586 {
588 return FALSE;
589 }
590
591 MSG Msg;
592 BOOL bRet;
593
594 CComPtr<IShellBrowser> browser;
595 CComPtr<IShellView> shellView;
596
597 browser.Attach(static_cast<IShellBrowser*>(hDesktop));
598 HRESULT hr = browser->QueryActiveShellView(&shellView);
600 return FALSE;
601
602 while ((bRet = ::GetMessageW(&Msg, NULL, 0, 0)) != 0)
603 {
604 if (bRet != -1)
605 {
606 if (shellView->TranslateAcceleratorW(&Msg) != S_OK)
607 {
610 }
611 }
612 }
613
614 return TRUE;
615}
struct @1765 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 622 of file CDesktopBrowser.cpp.

623{
624 TRACE("\n");
625
626 if (GetSystemMetrics(SM_REMOTESESSION) || GetSystemMetrics(SM_REMOTECONTROL))
627 return FALSE;
628
629 DEVMODEW DevMode;
630 ZeroMemory(&DevMode, sizeof(DevMode));
631 DevMode.dmSize = sizeof(DevMode);
632
634 return FALSE;
635
636 if (!DevMode.dmPelsWidth || !DevMode.dmPelsHeight)
637 return FALSE;
638
639 HDC hDC = GetDC(NULL);
640 DWORD cxWidth = GetDeviceCaps(hDC, HORZRES);
641 DWORD cyHeight = GetDeviceCaps(hDC, VERTRES);
643
644 return (cxWidth != DevMode.dmPelsWidth || cyHeight != DevMode.dmPelsHeight);
645}
static HDC hDC
Definition: 3dtext.c:33
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ZeroMemory
Definition: minwinbase.h:31
static HDC
Definition: imagelist.c:88
#define TRACE(s)
Definition: solgame.cpp:4
DWORD dmPelsWidth
Definition: wingdi.h:2094
DWORD dmPelsHeight
Definition: wingdi.h:2095
WORD dmSize
Definition: wingdi.h:2066
BOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode)
Definition: display.c:408
#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:1069
int WINAPI GetSystemMetrics(_In_ int)

◆ ShowFolderOptionsDialog()

VOID WINAPI ShowFolderOptionsDialog ( UINT  Page,
BOOL  Async 
)

Definition at line 259 of file misc.cpp.

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

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