ReactOS  0.4.12-dev-75-g00dd17e
DesktopShellView Struct Reference

subclassed ShellView window More...

#include <desktop.h>

Inheritance diagram for DesktopShellView:
Collaboration diagram for DesktopShellView:

Public Types

typedef ExtContextMenuHandlerT< SubclassedWindowsuper
 
- Public Types inherited from ExtContextMenuHandlerT< SubclassedWindow >
typedef SubclassedWindow super
 
- Public Types inherited from SubclassedWindow
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 Member Functions

 DesktopShellView (HWND hwnd, IShellView *pShellView)
 
 ~DesktopShellView ()
 
bool InitDragDrop ()
 
- Public Member Functions inherited from ExtContextMenuHandlerT< SubclassedWindow >
 ExtContextMenuHandlerT (HWND hwnd)
 
 ExtContextMenuHandlerT (HWND hwnd, const PARA &info)
 
LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
- Public Member Functions inherited from SubclassedWindow
 SubclassedWindow (HWND)
 
- 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)
 

Protected Member Functions

LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
int Command (int id, int code)
 
int Notify (int id, NMHDR *pnmh)
 
bool DoContextMenu (int x, int y)
 
HRESULT DoDesktopContextMenu (int x, int y)
 
void PositionIcons (int dir=1)
 
void refresh ()
 
- Protected Member Functions inherited from Window
virtual LRESULT Init (LPCREATESTRUCT pcs)
 

Protected Attributes

IShellView_pShellView
 
HWND _hwndListView
 
int _icon_algo
 
- Protected Attributes inherited from ExtContextMenuHandlerT< SubclassedWindow >
CtxMenuInterfaces _cm_ifs
 
- Protected Attributes inherited from SubclassedWindow
WNDPROC _orgWndProc
 

Additional Inherited Members

- 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 ()
 
- Public Attributes inherited from Window
IAccessible IAccessible_iface
 
IOleWindow IOleWindow_iface
 
IEnumVARIANT IEnumVARIANT_iface
 
LONG ref
 
- Static Protected Member Functions inherited from SubclassedWindow
static LRESULT CALLBACK SubclassedWndProc (HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 
- 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

subclassed ShellView window

Definition at line 169 of file desktop.h.

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ DesktopShellView()

DesktopShellView::DesktopShellView ( HWND  hwnd,
IShellView pShellView 
)

Definition at line 520 of file desktop.cpp.

521  : super(hwnd),
522  _pShellView(pShellView)
523 {
525 
526  // work around for Windows NT, Win 98, ...
527  // Without this the desktop has mysteriously only a size of 800x600 pixels.
528  ClientRect rect(hwnd);
529  MoveWindow(_hwndListView, 0, 0, rect.right, rect.bottom, TRUE);
530 
531  // subclass background window
533 
534  _icon_algo = 0; // default icon arrangement
535 
536  InitDragDrop();
537 }
#define TRUE
Definition: types.h:120
#define GW_CHILD
Definition: winuser.h:758
#define GetNextWindow(h, c)
Definition: winuser.h:4596
HWND _hwndListView
Definition: desktop.h:191
& rect
Definition: startmenu.cpp:1413
bool InitDragDrop()
Definition: desktop.cpp:547
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
ExtContextMenuHandlerT< SubclassedWindow > super
Definition: desktop.h:171
IShellView * _pShellView
Definition: desktop.h:179
subclassed background window behind the visible desktop window
Definition: desktop.h:35

◆ ~DesktopShellView()

DesktopShellView::~DesktopShellView ( )

Definition at line 540 of file desktop.cpp.

541 {
542  if (FAILED(RevokeDragDrop(_hwnd)))
543  assert(0);
544 }
#define assert(x)
Definition: debug.h:53
HRESULT WINAPI RevokeDragDrop(HWND hwnd)
Definition: ole2.c:633

Member Function Documentation

◆ Command()

int DesktopShellView::Command ( int  id,
int  code 
)
protectedvirtual

Reimplemented from SubclassedWindow.

Definition at line 602 of file desktop.cpp.

603 {
604  return super::Command(id, code);
605 }
virtual int Command(int id, int code)
Definition: window.cpp:348

◆ DoContextMenu()

bool DesktopShellView::DoContextMenu ( int  x,
int  y 
)
protected

Definition at line 612 of file desktop.cpp.

Referenced by WndProc().

613 {
615 
616  HRESULT hr = _pShellView->GetItemObject(SVGIO_SELECTION, IID_IDataObject, (void**)&selection);
617  if (FAILED(hr))
618  return false;
619 
620  PIDList pidList;
621 
622  hr = pidList.GetData(selection);
623  if (FAILED(hr)) {
624  selection->Release();
625  //CHECKERROR(hr);
626  return false;
627  }
628 
629  LPIDA pida = pidList;
630  if (!pida->cidl) {
631  selection->Release();
632  return false;
633  }
634 
635  LPCITEMIDLIST parent_pidl = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[0]);
636 
637  LPCITEMIDLIST* apidl = (LPCITEMIDLIST*) alloca(pida->cidl*sizeof(LPCITEMIDLIST));
638 
639  for(int i=pida->cidl; i>0; --i)
640  apidl[i-1] = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[i]);
641 
642  hr = ShellFolderContextMenu(ShellFolder(parent_pidl), _hwnd, pida->cidl, apidl, x, y, _cm_ifs);
643 
644  selection->Release();
645 
646  if (SUCCEEDED(hr))
647  refresh();
648  else
649  CHECKERROR(hr);
650 
651  return true;
652 }
HRESULT GetData(IDataObject *selection)
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
const GUID IID_IDataObject
int selection
Definition: ctm.c:90
#define alloca
Definition: malloc.h:361
INT INT y
Definition: msvc.h:62
GLenum GLclampf GLint i
Definition: glfuncs.h:14
unsigned char * LPBYTE
Definition: typedefs.h:52
#define CHECKERROR(hr)
Definition: shellclasses.h:162
list of PIDLs
static IShellFolder ShellFolder
Definition: ordinal.c:2632
LONG HRESULT
Definition: typedefs.h:77
UINT cidl
Definition: shlobj.h:476
nsrefcnt Release()
INT x
Definition: msvc.h:62
UINT aoffset[1]
Definition: shlobj.h:477
IShellView * _pShellView
Definition: desktop.h:179
HRESULT GetItemObject([in] UINT uItem, [in] REFIID riid, [out, iid_is(riid)] void **ppv)
HRESULT ShellFolderContextMenu(IShellFolder *shell_folder, HWND hwndParent, int cidl, LPCITEMIDLIST *apidl, int x, int y, CtxMenuInterfaces &cm_ifs)
#define SUCCEEDED(hr)
Definition: intsafe.h:57
Definition: shlobj.h:475

◆ DoDesktopContextMenu()

HRESULT DesktopShellView::DoDesktopContextMenu ( int  x,
int  y 
)
protected

Definition at line 654 of file desktop.cpp.

Referenced by WndProc().

655 {
656  IContextMenu* pcm;
657 
658  HRESULT hr = DesktopFolder()->GetUIObjectOf(_hwnd, 0, NULL, IID_IContextMenu, NULL, (LPVOID*)&pcm);
659 
660  if (SUCCEEDED(hr)) {
661  pcm = _cm_ifs.query_interfaces(pcm);
662 
664 
665  if (hmenu) {
666  hr = pcm->QueryContextMenu(hmenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST-1, CMF_NORMAL|CMF_EXPLORE);
667 
668  if (SUCCEEDED(hr)) {
669  AppendMenu(hmenu, MF_SEPARATOR, 0, NULL);
671 
672  UINT idCmd = TrackPopupMenu(hmenu, TPM_LEFTALIGN|TPM_RETURNCMD|TPM_RIGHTBUTTON, x, y, 0, _hwnd, NULL);
673 
674  _cm_ifs.reset();
675 
676  if (idCmd == FCIDM_SHVIEWLAST-1) {
677  explorer_about(_hwnd);
678  } else if (idCmd) {
679  CMINVOKECOMMANDINFO cmi;
680 
681  cmi.cbSize = sizeof(CMINVOKECOMMANDINFO);
682  cmi.fMask = 0;
683  cmi.hwnd = _hwnd;
684  cmi.lpVerb = (LPCSTR)(INT_PTR)(idCmd - FCIDM_SHVIEWFIRST);
685  cmi.lpParameters = NULL;
686  cmi.lpDirectory = NULL;
687  cmi.nShow = SW_SHOWNORMAL;
688  cmi.dwHotKey = 0;
689  cmi.hIcon = 0;
690 
691  hr = pcm->InvokeCommand(&cmi);
692  }
693  } else
694  _cm_ifs.reset();
695  DestroyMenu(hmenu);
696  }
697 
698  pcm->Release();
699  }
700 
701  return hr;
702 }
static HMENU hmenu
Definition: win.c:66
#define TPM_LEFTALIGN
Definition: winuser.h:2331
#define TPM_RETURNCMD
Definition: winuser.h:2341
#define FCIDM_SHVIEWFIRST
Definition: shlobj.h:484
int32_t INT_PTR
Definition: typedefs.h:62
void explorer_about(HWND hwndParent)
Definition: explorer.cpp:934
#define IDS_ABOUT_EXPLORER
Definition: resource.h:31
INT INT y
Definition: msvc.h:62
#define TPM_RIGHTBUTTON
Definition: winuser.h:2334
smooth NULL
Definition: ftsmooth.c:416
#define MF_SEPARATOR
Definition: winuser.h:137
const char * LPCSTR
Definition: xmlstorage.h:183
#define FCIDM_SHVIEWLAST
Definition: shlobj.h:517
#define AppendMenu
Definition: winuser.h:5597
LONG HRESULT
Definition: typedefs.h:77
unsigned int UINT
Definition: ndis.h:50
nsrefcnt Release()
BOOL WINAPI DestroyMenu(_In_ HMENU)
IContextMenu * query_interfaces(IContextMenu *pcm1)
#define SW_SHOWNORMAL
Definition: winuser.h:764
INT x
Definition: msvc.h:62
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:846
convenient loading of string resources
Definition: globals.h:303
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define SUCCEEDED(hr)
Definition: intsafe.h:57
Shell folder of the desktop.

◆ InitDragDrop()

bool DesktopShellView::InitDragDrop ( )

Definition at line 547 of file desktop.cpp.

Referenced by DesktopShellView().

548 {
549  CONTEXT("DesktopShellView::InitDragDrop()");
550 
551  DesktopDropTarget * pDropTarget = new DesktopDropTarget(_hwnd);
552 
553  if (!pDropTarget)
554  return false;
555 
556  pDropTarget->AddRef();
557 
558  if (FAILED(RegisterDragDrop(_hwnd, pDropTarget))) {
559  pDropTarget->Release();
560  return false;
561  }
562 
563  FORMATETC ftetc;
564 
565  ftetc.dwAspect = DVASPECT_CONTENT;
566  ftetc.lindex = -1;
567  ftetc.tymed = TYMED_HGLOBAL;
568  ftetc.cfFormat = CF_HDROP;
569 
570  pDropTarget->AddSuportedFormat(ftetc);
571  pDropTarget->Release();
572 
573  return true;
574 }
struct _CONTEXT CONTEXT
void AddSuportedFormat(FORMATETC &ftetc)
Definition: dragdropimpl.h:184
HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
Definition: ole2.c:551
OLE drop target for the desktop window.
Definition: desktop.h:95
#define CF_HDROP
Definition: constants.h:410
virtual ULONG STDMETHODCALLTYPE AddRef()
Definition: dragdropimpl.h:192
virtual ULONG STDMETHODCALLTYPE Release()

◆ Notify()

int DesktopShellView::Notify ( int  id,
NMHDR pnmh 
)
protectedvirtual

Reimplemented from SubclassedWindow.

Definition at line 607 of file desktop.cpp.

608 {
609  return super::Notify(id, pnmh);
610 }
virtual int Notify(int id, NMHDR *pnmh)
Definition: window.cpp:353

◆ PositionIcons()

void DesktopShellView::PositionIcons ( int  dir = 1)
protected
Todo:

Definition at line 757 of file desktop.cpp.

Referenced by WndProc().

758 {
760 
761  RECT work_area;
762  SystemParametersInfo(SPI_GETWORKAREA, 0, &work_area, 0);
763 
764  /* disable default allignment */
765  SetWindowStyle(_hwndListView, GetWindowStyle(_hwndListView)&~LVS_ALIGNMASK);//|LVS_ALIGNTOP|LVS_AUTOARRANGE);
766 
767  const POINTS& dir1 = s_align_dir1[_icon_algo];
768  const POINTS& dir2 = s_align_dir2[_icon_algo];
769  const POINTS& start_pos = s_align_start[_icon_algo];
770 
771  int dir_x1 = dir1.x;
772  int dir_y1 = dir1.y;
773  int dir_x2 = dir2.x;
774  int dir_y2 = dir2.y;
775 
776  int cx = LOWORD(spacing);
777  int cy = HIWORD(spacing);
778 
779  int dx1 = dir_x1 * cx;
780  int dy1 = dir_y1 * cy;
781  int dx2 = dir_x2 * cx;
782  int dy2 = dir_y2 * cy;
783 
784  int xoffset = (cx-32)/2;
785  int yoffset = 4/*(cy-32)/2*/;
786 
787  int start_x = start_pos.x * (work_area.right - cx) + xoffset;
788  int start_y = start_pos.y * (work_area.bottom - cy) + yoffset;
789 
790  int x = start_x;
791  int y = start_y;
792 
794  int i1, i2;
795 
796  if (dir > 0) {
797  i1 = 0;
798  i2 = all;
799  } else {
800  i1 = all-1;
801  i2 = -1;
802  }
803 
804  IconMap pos_idx;
805  int cnt = 0;
806  int xhv = start_x;
807  int yhv = start_y;
808 
809  for(int idx=i1; idx!=i2; idx+=dir) {
810  pos_idx[IconPos(y, x)] = idx;
811 
813  if (++cnt & 1)
814  x = work_area.right - x - cx + 2*xoffset;
815  else {
816  y += dy1;
817 
818  if (y + cy - 2 * yoffset > work_area.bottom) {
819  y = start_y;
820  start_x += dx2;
821  x = start_x;
822  }
823  }
824 
825  continue;
826  }
827  else if (_icon_algo == ARRANGE_BORDER_HV) {
828  if (++cnt & 1)
829  x = work_area.right - x - cx + 2*xoffset;
830  else if (cnt & 2) {
831  yhv += cy;
832  y = yhv;
833  x = start_x;
834 
835  if (y + cy - 2 * yoffset > work_area.bottom) {
836  start_x += cx;
837  xhv = start_x;
838  x = xhv;
839  start_y += cy;
840  yhv = start_y;
841  y = yhv;
842  }
843  } else {
844  xhv += cx;
845  x = xhv;
846  y = start_y;
847 
848  if (x + cx - 2 * xoffset > work_area.right) {
849  start_x += cx;
850  xhv = start_x;
851  x = xhv;
852  start_y += cy;
853  yhv = start_y;
854  y = yhv;
855  }
856  }
857 
858  continue;
859  }
860  else if (_icon_algo == ARRANGE_ROUNDABOUT) {
861 
863 
864  }
865 
866  x += dx1;
867  y += dy1;
868 
869  if (x<0 || x+cx-2*xoffset>work_area.right) {
870  x = start_x;
871  y += dy2;
872  } else if (y<0 || y+cy-2*yoffset>work_area.bottom) {
873  y = start_y;
874  x += dx2;
875  }
876  }
877 
878  // use a little trick to get the icons where we want them to be...
879 
880  //for(IconMap::const_iterator it=pos_idx.end(); --it!=pos_idx.begin(); ) {
881  // const IconPos& pos = it->first;
882 
883  // ListView_SetItemPosition32(_hwndListView, it->second, pos.second, pos.first);
884  //}
885 
886  for(IconMap::const_iterator it=pos_idx.begin(); it!=pos_idx.end(); ++it) {
887  const IconPos& pos = it->first;
888 
889  ListView_SetItemPosition32(_hwndListView, it->second, pos.second, pos.first);
890  }
891 }
#define ARRANGE_ROUNDABOUT
Definition: desktop.cpp:707
static int start_x
Definition: maze.c:118
static const POINTS s_align_dir1[]
Definition: desktop.cpp:724
#define LVS_ALIGNMASK
Definition: commctrl.h:2251
#define SystemParametersInfo
Definition: winuser.h:5724
HWND _hwndListView
Definition: desktop.h:191
pair< int, int > IconPos
Definition: desktop.cpp:754
#define ARRANGE_BORDER_HV
Definition: desktop.cpp:706
#define SetWindowStyle(hwnd, val)
Definition: utility.h:153
LONG right
Definition: windef.h:298
GLint GLint GLint yoffset
Definition: gl.h:1547
_Rep_type::const_iterator const_iterator
Definition: _map.h:86
#define GetWindowStyle(hwnd)
Definition: windowsx.h:290
INT INT y
Definition: msvc.h:62
static const POINTS s_align_dir2[]
Definition: desktop.cpp:739
GLint GLint xoffset
Definition: gl.h:1547
unsigned int idx
Definition: utils.c:41
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2277
SHORT x
Definition: windef.h:332
unsigned int dir
Definition: maze.c:112
#define ARRANGE_BORDER_DOWN
Definition: desktop.cpp:705
_T1 first
Definition: _pair.h:51
#define ListView_SetItemPosition32(hwndLV, i, x0, y0)
Definition: commctrl.h:2676
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint i2
Definition: glfuncs.h:96
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: _map.h:44
static const POINTS s_align_start[]
Definition: desktop.cpp:709
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint i1
Definition: glfuncs.h:96
SHORT y
Definition: windef.h:333
INT x
Definition: msvc.h:62
Definition: _pair.h:47
_T2 second
Definition: _pair.h:52
_Out_opt_ int * cx
Definition: commctrl.h:570
static int start_y
Definition: maze.c:118
#define HIWORD(l)
Definition: typedefs.h:246
LONG bottom
Definition: windef.h:299
iterator begin()
Definition: _map.h:163
#define ListView_GetItemSpacing(hwndLV, fSmall)
Definition: commctrl.h:2682
#define LOWORD(l)
Definition: pedump.c:82
iterator end()
Definition: _map.h:165

◆ refresh()

void DesktopShellView::refresh ( )
protected
Todo:

Definition at line 894 of file desktop.cpp.

Referenced by DoContextMenu().

895 {
897 }

◆ WndProc()

LRESULT DesktopShellView::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
)
protectedvirtual

Reimplemented from SubclassedWindow.

Definition at line 576 of file desktop.cpp.

577 {
578  switch(nmsg) {
579  case WM_CONTEXTMENU:
582  break;
583 
585  _icon_algo = wparam;
586  PositionIcons();
587  break;
588 
590  return _icon_algo;
591 
592  case PM_DISPLAY_VERSION:
593  return SendMessage(_hwndListView, nmsg, wparam, lparam);
594 
595  default:
596  return super::WndProc(nmsg, wparam, lparam);
597  }
598 
599  return 0;
600 }
#define WM_CONTEXTMENU
Definition: richedit.h:64
#define PM_DISPLAY_VERSION
Definition: desktop.h:31
HWND _hwndListView
Definition: desktop.h:191
HRESULT DoDesktopContextMenu(int x, int y)
Definition: desktop.cpp:654
#define GET_X_LPARAM(lp)
Definition: precomp.h:67
#define PM_GET_ICON_ALGORITHM
Definition: desktop.h:30
#define PM_SET_ICON_ALGORITHM
Definition: desktop.h:29
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
UINT WPARAM LPARAM lparam
Definition: msvc.h:92
#define GET_Y_LPARAM(lp)
Definition: precomp.h:68
bool DoContextMenu(int x, int y)
Definition: desktop.cpp:612
#define SendMessage
Definition: winuser.h:5709
void PositionIcons(int dir=1)
Definition: desktop.cpp:757
UINT WPARAM wparam
Definition: msvc.h:92

Member Data Documentation

◆ _hwndListView

HWND DesktopShellView::_hwndListView
protected

Definition at line 191 of file desktop.h.

Referenced by DesktopShellView(), PositionIcons(), and WndProc().

◆ _icon_algo

int DesktopShellView::_icon_algo
protected

Definition at line 192 of file desktop.h.

Referenced by DesktopShellView(), PositionIcons(), and WndProc().

◆ _pShellView

IShellView* DesktopShellView::_pShellView
protected

Definition at line 179 of file desktop.h.

Referenced by DoContextMenu().


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