ReactOS 0.4.15-dev-7942-gd23573b
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 516 of file CDesktopBrowser.cpp.

517{
518 return ShellObjectCreatorInit<CDesktopBrowser, IShellDesktopTray*>(Tray, riid, ppv);
519}
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 525 of file CDesktopBrowser.cpp.

526{
527 if (Tray == NULL)
528 {
530 return NULL;
531 }
532
533 CComPtr<IShellBrowser> Browser;
536 return NULL;
537
538 return static_cast<HANDLE>(Browser.Detach());
539}
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 545 of file CDesktopBrowser.cpp.

546{
547 if (hDesktop == NULL)
548 {
550 return FALSE;
551 }
552
553 MSG Msg;
554 BOOL bRet;
555
556 CComPtr<IShellBrowser> browser;
557 CComPtr<IShellView> shellView;
558
559 browser.Attach(static_cast<IShellBrowser*>(hDesktop));
560 HRESULT hr = browser->QueryActiveShellView(&shellView);
562 return FALSE;
563
564 while ((bRet = ::GetMessageW(&Msg, NULL, 0, 0)) != 0)
565 {
566 if (bRet != -1)
567 {
568 if (shellView->TranslateAcceleratorW(&Msg) != S_OK)
569 {
572 }
573 }
574 }
575
576 return TRUE;
577}
struct @1632 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 584 of file CDesktopBrowser.cpp.

585{
586 TRACE("\n");
587
588 if (GetSystemMetrics(SM_REMOTESESSION) || GetSystemMetrics(SM_REMOTECONTROL))
589 return FALSE;
590
591 DEVMODEW DevMode;
592 ZeroMemory(&DevMode, sizeof(DevMode));
593 DevMode.dmSize = sizeof(DevMode);
594
596 return FALSE;
597
598 if (!DevMode.dmPelsWidth || !DevMode.dmPelsHeight)
599 return FALSE;
600
601 HDC hDC = GetDC(NULL);
602 DWORD cxWidth = GetDeviceCaps(hDC, HORZRES);
603 DWORD cyHeight = GetDeviceCaps(hDC, VERTRES);
605
606 return (cxWidth != DevMode.dmPelsWidth || cyHeight != DevMode.dmPelsHeight);
607}
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: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:1058
int WINAPI GetSystemMetrics(_In_ int)

◆ ShowFolderOptionsDialog()

VOID WINAPI ShowFolderOptionsDialog ( UINT  Page,
BOOL  Async 
)

Definition at line 278 of file misc.cpp.

279{
280 char buf[MAX_PATH];
281 wsprintfA(buf, "rundll32.exe shell32.dll,Options_RunDLL %u", Page);
283}
#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:775

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