ReactOS  0.4.12-dev-75-g00dd17e
DesktopWindow Struct Reference

Implementation of the Explorer desktop window. More...

#include <desktop.h>

Inheritance diagram for DesktopWindow:
Collaboration diagram for DesktopWindow:

Public Types

typedef PreTranslateWindow super
 
- Public Types inherited from PreTranslateWindow
typedef Window super
 
- Public Types inherited from Window
typedef map< HWND, Window * > WindowMap
 
typedef Window *(* CREATORFUNC) (HWND)
 
typedef Window *(* CREATORFUNC_INFO) (HWND, const void *)
 
- Public Types inherited from IShellBrowser
typedef IShellBrowserLPSHELLBROWSER
 
typedef LPTBBUTTON LPTBBUTTONSB
 
- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IServiceProvider
typedef IServiceProviderLPSERVICEPROVIDER
 
- Public Types inherited from IOleCommandTarget
enum  OLECMDF {
  OLECMDF_SUPPORTED = 0x1, OLECMDF_ENABLED = 0x2, OLECMDF_LATCHED = 0x4, OLECMDF_NINCHED = 0x8,
  OLECMDF_INVISIBLE = 0x10, OLECMDF_DEFHIDEONCTXTMENU = 0x20
}
 
enum  OLECMDTEXTF { OLECMDTEXTF_NONE = 0, OLECMDTEXTF_NAME = 1, OLECMDTEXTF_STATUS = 2 }
 
enum  OLECMDEXECOPT { OLECMDEXECOPT_DODEFAULT = 0, OLECMDEXECOPT_PROMPTUSER = 1, OLECMDEXECOPT_DONTPROMPTUSER = 2, OLECMDEXECOPT_SHOWHELP = 3 }
 
enum  OLECMDID {
  OLECMDID_OPEN = 1, OLECMDID_NEW = 2, OLECMDID_SAVE = 3, OLECMDID_SAVEAS = 4,
  OLECMDID_SAVECOPYAS = 5, OLECMDID_PRINT = 6, OLECMDID_PRINTPREVIEW = 7, OLECMDID_PAGESETUP = 8,
  OLECMDID_SPELL = 9, OLECMDID_PROPERTIES = 10, OLECMDID_CUT = 11, OLECMDID_COPY = 12,
  OLECMDID_PASTE = 13, OLECMDID_PASTESPECIAL = 14, OLECMDID_UNDO = 15, OLECMDID_REDO = 16,
  OLECMDID_SELECTALL = 17, OLECMDID_CLEARSELECTION = 18, OLECMDID_ZOOM = 19, OLECMDID_GETZOOMRANGE = 20,
  OLECMDID_UPDATECOMMANDS = 21, OLECMDID_REFRESH = 22, OLECMDID_STOP = 23, OLECMDID_HIDETOOLBARS = 24,
  OLECMDID_SETPROGRESSMAX = 25, OLECMDID_SETPROGRESSPOS = 26, OLECMDID_SETPROGRESSTEXT = 27, OLECMDID_SETTITLE = 28,
  OLECMDID_SETDOWNLOADSTATE = 29, OLECMDID_STOPDOWNLOAD = 30, OLECMDID_ONTOOLBARACTIVATED = 31, OLECMDID_FIND = 32,
  OLECMDID_DELETE = 33, OLECMDID_HTTPEQUIV = 34, OLECMDID_HTTPEQUIV_DONE = 35, OLECMDID_ENABLE_INTERACTION = 36,
  OLECMDID_ONUNLOAD = 37, OLECMDID_PROPERTYBAG2 = 38, OLECMDID_PREREFRESH = 39, OLECMDID_SHOWSCRIPTERROR = 40,
  OLECMDID_SHOWMESSAGE = 41, OLECMDID_SHOWFIND = 42, OLECMDID_SHOWPAGESETUP = 43, OLECMDID_SHOWPRINT = 44,
  OLECMDID_CLOSE = 45, OLECMDID_ALLOWUILESSSAVEAS = 46, OLECMDID_DONTDOWNLOADCSS = 47, OLECMDID_UPDATEPAGESTATUS = 48,
  OLECMDID_PRINT2 = 49, OLECMDID_PRINTPREVIEW2 = 50, OLECMDID_SETPRINTTEMPLATE = 51, OLECMDID_GETPRINTTEMPLATE = 52,
  OLECMDID_PAGEACTIONBLOCKED = 55, OLECMDID_PAGEACTIONUIQUERY = 56, OLECMDID_FOCUSVIEWCONTROLS = 57, OLECMDID_FOCUSVIEWCONTROLSQUERY = 58,
  OLECMDID_SHOWPAGEACTIONMENU = 59, OLECMDID_ADDTRAVELENTRY = 60, OLECMDID_UPDATETRAVELENTRY = 61, OLECMDID_UPDATEBACKFORWARDSTATE = 62,
  OLECMDID_OPTICAL_ZOOM = 63, OLECMDID_OPTICAL_GETZOOMRANGE = 64, OLECMDID_WINDOWSTATECHANGED = 65, OLECMDID_ACTIVEXINSTALLSCOPE = 66,
  OLECMDID_UPDATETRAVELENTRY_DATARECOVERY = 67, OLECMDID_SHOWTASKDLG = 68, OLECMDID_POPSTATEEVENT = 69, OLECMDID_VIEWPORT_MODE = 70,
  OLECMDID_LAYOUT_VIEWPORT_WIDTH = 71, OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM = 72, OLECMDID_USER_OPTICAL_ZOOM = 73, OLECMDID_PAGEAVAILABLE = 74,
  OLECMDID_GETUSERSCALABLE = 75, OLECMDID_UPDATE_CARET = 76, OLECMDID_ENABLE_VISIBILITY = 77, OLECMDID_MEDIA_PLAYBACK = 78
}
 
typedef IOleCommandTargetLPOLECOMMANDTARGET
 
typedef enum IOleCommandTarget::OLECMDF OLECMDF
 
typedef struct IOleCommandTarget::_tagOLECMD OLECMD
 
typedef struct IOleCommandTarget::_tagOLECMDTEXT OLECMDTEXT
 
typedef enum IOleCommandTarget::OLECMDTEXTF OLECMDTEXTF
 
typedef enum IOleCommandTarget::OLECMDEXECOPT OLECMDEXECOPT
 
typedef enum IOleCommandTarget::OLECMDID OLECMDID
 

Public Member Functions

 DesktopWindow (HWND hwnd)
 
 ~DesktopWindow ()
 
virtual HRESULT STDMETHODCALLTYPE GetWindow (HWND *lphwnd)
 
virtual HRESULT STDMETHODCALLTYPE QueryActiveShellView (IShellView **ppshv)
 
virtual HRESULT STDMETHODCALLTYPE GetControlWindow (UINT id, HWND *lphwnd)
 
virtual HRESULT STDMETHODCALLTYPE SendControlMsg (UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
 
- Public Member Functions inherited from PreTranslateWindow
 PreTranslateWindow (HWND)
 
 ~PreTranslateWindow ()
 
- Public Member Functions inherited from Window
 Window (HWND hwnd)
 
virtual ~Window ()
 
LRESULT SendParent (UINT nmsg, WPARAM wparam=0, LPARAM lparam=0)
 
LRESULT PostParent (UINT nmsg, WPARAM wparam=0, LPARAM lparam=0)
 
- Public Member Functions inherited from IShellBrowserImpl
 IShellBrowserImpl ()
 
virtual ~IShellBrowserImpl ()
 
virtual HRESULT STDMETHODCALLTYPE QueryInterface (REFIID iid, void **ppvObject)
 
virtual ULONG STDMETHODCALLTYPE AddRef ()
 
virtual ULONG STDMETHODCALLTYPE Release ()
 
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp (BOOL fEnterMode)
 
virtual HRESULT STDMETHODCALLTYPE OnDefaultCommand (IShellView *ppshv)
 
virtual HRESULT STDMETHODCALLTYPE OnStateChange (IShellView *ppshv, ULONG uChange)
 
virtual HRESULT STDMETHODCALLTYPE IncludeObject (IShellView *ppshv, LPCITEMIDLIST pidl)
 
virtual HRESULT STDMETHODCALLTYPE InsertMenusSB (HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
 
virtual HRESULT STDMETHODCALLTYPE SetMenuSB (HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject)
 
virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB (HMENU hmenuShared)
 
virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB (LPCOLESTR lpszStatusText)
 
virtual HRESULT STDMETHODCALLTYPE EnableModelessSB (BOOL fEnable)
 
virtual HRESULT STDMETHODCALLTYPE BrowseObject (LPCITEMIDLIST pidl, UINT wFlags)
 
virtual HRESULT STDMETHODCALLTYPE GetViewStateStream (DWORD grfMode, LPSTREAM *ppStrm)
 
virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive (IShellView *ppshv)
 
virtual HRESULT STDMETHODCALLTYPE SetToolbarItems (LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags)
 
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB (LPMSG lpmsg, WORD wID)
 
virtual HRESULT STDMETHODCALLTYPE QueryService (REFGUID guidService, REFIID riid, void **ppvObject)
 
virtual HRESULT STDMETHODCALLTYPE QueryStatus (const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
 
virtual HRESULT STDMETHODCALLTYPE Exec (const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
- Public Member Functions inherited from IShellBrowser
HRESULT TranslateAcceleratorSB ([in] MSG *pmsg, [in] WORD wID)
 
HRESULT GetViewStateStream ([in] DWORD grfMode, [out] IStream **ppStrm)
 
- Public Member Functions inherited from IServiceProvider
HRESULT RemoteQueryService ([in] REFGUID guidService, [in] REFIID riid, [out, iid_is(riid)] IUnknown **ppvObject)
 

Static Public Member Functions

static HWND Create ()
 
- Static Public Member Functions inherited from Window
static HWND Create (CREATORFUNC creator, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
 
static HWND Create (CREATORFUNC_INFO creator, const void *info, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
 
static Windowcreate_mdi_child (const ChildWndInfo &info, const MDICREATESTRUCT &mcs, CREATORFUNC_INFO creator)
 
static LRESULT CALLBACK WindowWndProc (HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 
static INT_PTR CALLBACK DialogProc (HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 
static Windowget_window (HWND hwnd)
 get window controller from window handle More...
 
template<typename CLASS >
static CLASS * get_window (HWND hwnd)
 
static void register_pretranslate (HWND hwnd)
 
static void unregister_pretranslate (HWND hwnd)
 
static BOOL pretranslate_msg (LPMSG pmsg)
 
static void register_dialog (HWND hwnd)
 
static void unregister_dialog (HWND hwnd)
 
static BOOL dispatch_dialog_msg (LPMSG pmsg)
 
static int MessageLoop ()
 
static void CancelModes ()
 

Protected Member Functions

LRESULT Init (LPCREATESTRUCT pcs)
 
LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
virtual HRESULT OnDefaultCommand (LPIDA pida)
 
- Protected Member Functions inherited from Window
virtual int Command (int id, int code)
 
virtual int Notify (int id, NMHDR *pnmh)
 

Protected Attributes

IShellView_pShellView
 
WindowHandle _desktopBar
 
- Protected Attributes inherited from IShellBrowserImpl
DWORD _dwRef
 

Additional Inherited Members

- Public Attributes inherited from Window
IAccessible IAccessible_iface
 
IOleWindow IOleWindow_iface
 
IEnumVARIANT IEnumVARIANT_iface
 
LONG ref
 
- Public Attributes inherited from IShellBrowserImpl
IShellBrowser IShellBrowser_iface
 
ICommDlgBrowser ICommDlgBrowser_iface
 
IServiceProvider IServiceProvider_iface
 
LONG ref
 
HWND hwndOwner
 
- Public Attributes inherited from IShellBrowser
FCT_ADDTOEND typedef LPARAM LPTBBUTTONSB
 
- Public Attributes inherited from ICommDlgBrowser
CDBOSC_STATECHANGE typedef ICommDlgBrowserLPCOMMDLGBROWSER
 
- Static Protected Member Functions inherited from Window
static Windowcreate_controller (HWND hwnd)
 create controller for a new window More...
 
static StaticWindowDataGetStaticWindowData ()
 
static LRESULT CALLBACK MDICBTHookProc (int code, WPARAM wparam, LPARAM lparam)
 
static LRESULT CALLBACK PropSheetCBTHookProc (int code, WPARAM wparam, LPARAM lparam)
 
- Static Protected Attributes inherited from Window
static WindowMap s_wnd_map
 
static const voids_new_info = NULL
 
static CREATORFUNC s_window_creator = NULL
 
static HHOOK s_hcbtHook = 0
 
static WindowSet s_pretranslate_windows
 
static WindowSet s_dialogs
 

Detailed Description

Implementation of the Explorer desktop window.

Definition at line 51 of file desktop.h.

Member Typedef Documentation

◆ super

Definition at line 53 of file desktop.h.

Constructor & Destructor Documentation

◆ DesktopWindow()

DesktopWindow::DesktopWindow ( HWND  hwnd)

Definition at line 313 of file desktop.cpp.

314  : super(hwnd)
315 {
316  _pShellView = NULL;
317 }
smooth NULL
Definition: ftsmooth.c:416
PreTranslateWindow super
Definition: desktop.h:53
IShellView * _pShellView
Definition: desktop.h:87

◆ ~DesktopWindow()

DesktopWindow::~DesktopWindow ( )

Definition at line 319 of file desktop.cpp.

320 {
321  if (_pShellView)
322  _pShellView->Release();
323 }
ULONG Release()
IShellView * _pShellView
Definition: desktop.h:87

Member Function Documentation

◆ Create()

HWND DesktopWindow::Create ( )
static

Definition at line 326 of file desktop.cpp.

Referenced by _tWinMain(), and Desktops::init().

327 {
328  static IconWindowClass wcDesktop(TEXT("Progman"), IDI_REACTOS, CS_DBLCLKS);
329  /* (disabled because of small ugly temporary artefacts when hiding start menu)
330  wcDesktop.hbrBackground = (HBRUSH)(COLOR_BACKGROUND+1); */
331 
334 
336  WS_EX_TOOLWINDOW, wcDesktop, TEXT("Program Manager"), WS_POPUP|WS_VISIBLE, //|WS_CLIPCHILDREN for SDI frames
337  0, 0, width, height, 0);
338 
339  // work around to display desktop bar in Wine
341 
342  // work around for Windows NT, Win 98, ...
343  // Without this the desktop has mysteriously only a size of 800x600 pixels.
344  MoveWindow(hwndDesktop, 0, 0, width, height, TRUE);
345 
346  return hwndDesktop;
347 }
#define WINDOW_CREATOR(WND_CLASS)
Definition: window.h:202
GLint GLint GLsizei width
Definition: gl.h:1546
#define TRUE
Definition: types.h:120
WindowHandle _desktopBar
Definition: desktop.h:88
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
#define SM_CXSCREEN
Definition: winuser.h:949
static HWND Create(CREATORFUNC creator, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
Definition: window.cpp:87
#define SW_SHOW
Definition: winuser.h:769
#define SM_CYSCREEN
Definition: winuser.h:950
Implementation of the Explorer desktop window.
Definition: desktop.h:51
int WINAPI GetSystemMetrics(_In_ int)
#define IDI_REACTOS
Definition: osk_res.h:22
#define CS_DBLCLKS
Definition: winuser.h:646
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
window class with specified icon from resources
Definition: window.h:258
#define TEXT(s)
Definition: k32.h:26
#define GET_WINDOW(CLASS, hwnd)
Definition: window.h:88
#define WS_POPUP
Definition: pedump.c:616
#define WS_VISIBLE
Definition: pedump.c:620

◆ GetControlWindow()

virtual HRESULT STDMETHODCALLTYPE DesktopWindow::GetControlWindow ( UINT  id,
HWND lphwnd 
)
inlinevirtual

Implements IShellBrowser.

Definition at line 73 of file desktop.h.

74  {
75  return E_NOTIMPL;
76  }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetWindow()

virtual HRESULT STDMETHODCALLTYPE DesktopWindow::GetWindow ( HWND lphwnd)
inlinevirtual

Implements IOleWindow.

Definition at line 60 of file desktop.h.

61  {
62  *lphwnd = _hwnd;
63  return S_OK;
64  }
#define S_OK
Definition: intsafe.h:59

◆ Init()

LRESULT DesktopWindow::Init ( LPCREATESTRUCT  pcs)
protectedvirtual
Todo:
use IShellBrowser::GetViewStateStream() to restore previous view state -> see SHOpenRegStream()

Reimplemented from Window.

Definition at line 350 of file desktop.cpp.

351 {
352  if (super::Init(pcs))
353  return 1;
354 
355  HRESULT hr = GetDesktopFolder()->CreateViewObject(_hwnd, IID_IShellView, (void**)&_pShellView);
356 /* also possible:
357  SFV_CREATE sfv_create;
358 
359  sfv_create.cbSize = sizeof(SFV_CREATE);
360  sfv_create.pshf = GetDesktopFolder();
361  sfv_create.psvOuter = NULL;
362  sfv_create.psfvcb = NULL;
363 
364  HRESULT hr = SHCreateShellFolderView(&sfv_create, &_pShellView);
365 */
366  HWND hWndView = 0;
367 
368  if (SUCCEEDED(hr)) {
370 
371  fs.ViewMode = FVM_ICON;
373 
374  ClientRect rect(_hwnd);
375 
376  hr = _pShellView->CreateViewWindow(NULL, &fs, this, &rect, &hWndView);
377 
379 
380  if (SUCCEEDED(hr)) {
381  g_Globals._hwndShellView = hWndView;
382 
383  // subclass shellview window
384  new DesktopShellView(hWndView, _pShellView);
385 
386  _pShellView->UIActivate(SVUIA_ACTIVATE_FOCUS);
387 
388  /*
389  IShellView2* pShellView2;
390 
391  hr = _pShellView->QueryInterface(IID_IShellView2, (void**)&pShellView2);
392 
393  SV2CVW2_PARAMS params;
394  params.cbSize = sizeof(SV2CVW2_PARAMS);
395  params.psvPrev = _pShellView;
396  params.pfs = &fs;
397  params.psbOwner = this;
398  params.prcView = &rect;
399  params.pvid = params.pvid;//@@
400 
401  hr = pShellView2->CreateViewWindow2(&params);
402  params.pvid;
403  */
404 
405  /*
406  IFolderView* pFolderView;
407 
408  hr = _pShellView->QueryInterface(IID_IFolderView, (void**)&pFolderView);
409 
410  if (SUCCEEDED(hr)) {
411  hr = pFolderView->GetAutoArrange();
412  hr = pFolderView->SetCurrentViewMode(FVM_DETAILS);
413  }
414  */
415  }
416  }
417 
418  if (hWndView && SetShellWindowEx)
419  SetShellWindowEx(_hwnd, hWndView);
420  else if (SetShellWindow)
421  SetShellWindow(_hwnd);
422 
423  // create the explorer bar
426 
427  return 0;
428 }
WindowHandle _desktopBar
Definition: desktop.h:88
HWND _hwndShellView
Definition: globals.h:288
virtual LRESULT Init(LPCREATESTRUCT pcs)
Definition: window.cpp:241
static HWND Create()
Definition: desktopbar.cpp:64
& rect
Definition: startmenu.cpp:1413
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
HWND _hwndDesktopBar
Definition: globals.h:287
BOOL WINAPI SetShellWindowEx(HWND, HWND)
Definition: ntwrapper.h:58
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
IShellView * _pShellView
Definition: desktop.h:87
ShellFolder & GetDesktopFolder()
subclassed ShellView window
Definition: desktop.h:169
#define fs
Definition: i386-dis.c:435
BOOL WINAPI SetShellWindow(HWND)
Definition: desktop.c:641
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ OnDefaultCommand()

HRESULT DesktopWindow::OnDefaultCommand ( LPIDA  pida)
protectedvirtual

Reimplemented from IShellBrowserImpl.

Definition at line 509 of file desktop.cpp.

510 {
511 #ifndef ROSSHELL // in shell-only-mode fall through and let shell32 handle the command
512  if (MainFrameBase::OpenShellFolders(pida, 0))
513  return S_OK;
514 #endif
515 
516  return E_NOTIMPL;
517 }
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
static int OpenShellFolders(LPIDA pida, HWND hFrameWnd)
Definition: mainframe.cpp:77

◆ QueryActiveShellView()

virtual HRESULT STDMETHODCALLTYPE DesktopWindow::QueryActiveShellView ( IShellView **  ppshv)
inlinevirtual

Implements IShellBrowser.

Definition at line 66 of file desktop.h.

67  {
69  *ppshv = _pShellView;
70  return S_OK;
71  }
ULONG AddRef()
IShellView * _pShellView
Definition: desktop.h:87
#define S_OK
Definition: intsafe.h:59

◆ SendControlMsg()

virtual HRESULT STDMETHODCALLTYPE DesktopWindow::SendControlMsg ( UINT  id,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
LRESULT pret 
)
inlinevirtual

Implements IShellBrowser.

Definition at line 78 of file desktop.h.

79  {
80  return E_NOTIMPL;
81  }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WndProc()

LRESULT DesktopWindow::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
)
protectedvirtual
Todo:
use IShellBrowser::GetViewStateStream() and _pShellView->SaveViewState() to store view state

Reimplemented from Window.

Definition at line 431 of file desktop.cpp.

432 {
433  switch(nmsg) {
434  case WM_LBUTTONDBLCLK:
435  case WM_RBUTTONDBLCLK:
436  case WM_MBUTTONDBLCLK:
438  break;
439 
440  case WM_DISPLAYCHANGE:
441  MoveWindow(_hwnd, 0, 0, LOWORD(lparam), HIWORD(lparam), TRUE);
444  break;
445 
446  case WM_GETISHELLBROWSER:
447  return (LRESULT)static_cast<IShellBrowser*>(this);
448 
449  case WM_DESTROY:
450 
452 
453  if (SetShellWindow)
454  SetShellWindow(0);
455  break;
456 
457  case WM_CLOSE:
458  ShowExitWindowsDialog(_hwnd);
459  break;
460 
461  case WM_SYSCOMMAND:
462  if (wparam == SC_TASKLIST) {
463  if (_desktopBar)
465  }
466  goto def;
467 
468  case WM_SYSCOLORCHANGE:
469  // redraw background window - it's done by system
470  //InvalidateRect(g_Globals._hwndShellView, NULL, TRUE);
471 
472  // forward message to common controls
475  break;
476 
477  case WM_SETTINGCHANGE:
479  break;
480 
481  case PM_TRANSLATE_MSG:
482  {
483  /* TranslateAccelerator is called for all explorer windows that are open
484  so we have to decide if this is the correct recipient */
485  LPMSG lpmsg = (LPMSG)lparam;
486  HWND hwnd = lpmsg->hwnd;
487 
488  while(hwnd)
489  {
490  if(hwnd == _hwnd)
491  break;
492 
493  hwnd = GetParent(hwnd);
494  }
495 
496  if (hwnd)
497  return _pShellView->TranslateAccelerator(lpmsg) == S_OK;
498  return false;
499  }
500 
501  default: def:
502  return super::WndProc(nmsg, wparam, lparam);
503  }
504 
505  return 0;
506 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1608
#define TRUE
Definition: types.h:120
WindowHandle _desktopBar
Definition: desktop.h:88
HWND _hwndShellView
Definition: globals.h:288
void explorer_show_frame(int cmdShow, LPTSTR lpCmdLine)
Definition: explorer.cpp:707
#define PM_TRANSLATE_MSG
Definition: window.h:266
#define WM_SETTINGCHANGE
Definition: winuser.h:1611
#define SC_TASKLIST
Definition: winuser.h:2553
#define WM_DESTROY
Definition: winuser.h:1591
struct tagMSG * LPMSG
#define WM_CLOSE
Definition: winuser.h:1603
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: window.cpp:280
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
#define WM_LBUTTONDBLCLK
Definition: winuser.h:1754
#define WM_GETISHELLBROWSER
Definition: filedlg.c:127
#define WM_MBUTTONDBLCLK
Definition: winuser.h:1760
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
UINT WPARAM LPARAM lparam
Definition: msvc.h:92
HRESULT TranslateAccelerator([in] MSG *pmsg)
IShellView * _pShellView
Definition: desktop.h:87
HWND WINAPI GetParent(_In_ HWND)
#define S_OK
Definition: intsafe.h:59
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define DESKTOPBARBAR_HEIGHT
Definition: desktopbar.h:33
HWND hwnd
Definition: winuser.h:3067
#define SendMessage
Definition: winuser.h:5709
#define WM_RBUTTONDBLCLK
Definition: winuser.h:1757
#define HIWORD(l)
Definition: typedefs.h:246
BOOL WINAPI SetShellWindow(HWND)
Definition: desktop.c:641
LONG_PTR LRESULT
Definition: windef.h:209
#define WM_SYSCOMMAND
Definition: winuser.h:1717
#define LOWORD(l)
Definition: pedump.c:82
void ShowExitWindowsDialog(HWND hwndOwner)
Definition: startmenu.cpp:2128
UINT WPARAM wparam
Definition: msvc.h:92

Member Data Documentation

◆ _desktopBar

WindowHandle DesktopWindow::_desktopBar
protected

Definition at line 88 of file desktop.h.

Referenced by Create(), Init(), and WndProc().

◆ _pShellView

IShellView* DesktopWindow::_pShellView
protected

Definition at line 87 of file desktop.h.

Referenced by DesktopWindow(), Init(), WndProc(), and ~DesktopWindow().


The documentation for this struct was generated from the following files: