ReactOS  0.4.15-dev-994-ga9f6032
CDefView.cpp File Reference
#include "precomp.h"
#include <atlwin.h>
#include <rosctrls.h>
Include dependency graph for CDefView.cpp:

Go to the source code of this file.

Classes

struct  LISTVIEW_SORT_INFO
 
class  CDefView
 

Macros

#define SHV_CHANGE_NOTIFY   WM_USER + 0x1111
 
#define CONTEXT_MENU_BASE_ID   1
 
#define IDM_VIEW_FILES   (FCIDM_SHVIEWFIRST + 0x500)
 
#define IDM_VIEW_IDW   (FCIDM_SHVIEWFIRST + 0x501)
 
#define IDM_MYFILEITEM   (FCIDM_SHVIEWFIRST + 0x502)
 
#define ID_LISTVIEW   1
 
#define GET_WM_COMMAND_ID(wp, lp)   LOWORD(wp)
 
#define GET_WM_COMMAND_HWND(wp, lp)   (HWND)(lp)
 
#define GET_WM_COMMAND_CMD(wp, lp)   HIWORD(wp)
 
#define SCROLLAREAWIDTH   20
 

Typedefs

typedef struct LISTVIEW_SORT_INFOLPLISTVIEW_SORT_INFO
 
typedef void(CALLBACKPFNSHGETSETTINGSPROC) (LPSHELLFLAGSTATE lpsfs, DWORD dwMask)
 
typedef CSimpleMap< LPARAM, INTCLParamIndexMap
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
static void ClientToListView (HWND hwndLV, POINT *ppt)
 
static VOID DrawTileBitmap (HDC hDC, LPCRECT prc, HBITMAP hbm, INT nWidth, INT nHeight, INT dx, INT dy)
 
DWORD WINAPI SHMenuIndexFromID (HMENU hMenu, UINT uID)
 
HMENU GetSubmenuByID (HMENU hmenu, UINT id)
 
UINT ReallyGetMenuItemID (HMENU hmenu, int i)
 
static BOOL SelectExtOnRename (void)
 
static BOOL ILIsParentOrSpecialParent (PCIDLIST_ABSOLUTE pidl1, PCIDLIST_ABSOLUTE pidl2)
 
HRESULT SHGetMenuIdFromMenuMsg (UINT uMsg, LPARAM lParam, UINT *CmdId)
 
HRESULT SHSetMenuIdInMenuMsg (UINT uMsg, LPARAM lParam, UINT CmdId)
 
static INT CALLBACK SelectionMoveCompareFunc (LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
 
HRESULT CDefView_CreateInstance (IShellFolder *pFolder, REFIID riid, LPVOID *ppvOut)
 
HRESULT WINAPI SHCreateShellFolderViewEx (LPCSFV psvcbi, IShellView **ppsv)
 
HRESULT WINAPI SHCreateShellFolderView (const SFV_CREATE *pcsfv, IShellView **ppsv)
 

Variables

static const WCHAR SV_CLASS_NAME [] = {'S', 'H', 'E', 'L', 'L', 'D', 'L', 'L', '_', 'D', 'e', 'f', 'V', 'i', 'e', 'w', 0}
 

Macro Definition Documentation

◆ CONTEXT_MENU_BASE_ID

#define CONTEXT_MENU_BASE_ID   1

Definition at line 58 of file CDefView.cpp.

◆ GET_WM_COMMAND_CMD

#define GET_WM_COMMAND_CMD (   wp,
  lp 
)    HIWORD(wp)

Definition at line 377 of file CDefView.cpp.

◆ GET_WM_COMMAND_HWND

#define GET_WM_COMMAND_HWND (   wp,
  lp 
)    (HWND)(lp)

Definition at line 376 of file CDefView.cpp.

◆ GET_WM_COMMAND_ID

#define GET_WM_COMMAND_ID (   wp,
  lp 
)    LOWORD(wp)

Definition at line 375 of file CDefView.cpp.

◆ ID_LISTVIEW

#define ID_LISTVIEW   1

Definition at line 372 of file CDefView.cpp.

◆ IDM_MYFILEITEM

#define IDM_MYFILEITEM   (FCIDM_SHVIEWFIRST + 0x502)

Definition at line 370 of file CDefView.cpp.

◆ IDM_VIEW_FILES

#define IDM_VIEW_FILES   (FCIDM_SHVIEWFIRST + 0x500)

Definition at line 368 of file CDefView.cpp.

◆ IDM_VIEW_IDW

#define IDM_VIEW_IDW   (FCIDM_SHVIEWFIRST + 0x501)

Definition at line 369 of file CDefView.cpp.

◆ SCROLLAREAWIDTH

#define SCROLLAREAWIDTH   20

Definition at line 3235 of file CDefView.cpp.

◆ SHV_CHANGE_NOTIFY

#define SHV_CHANGE_NOTIFY   WM_USER + 0x1111

Definition at line 54 of file CDefView.cpp.

Typedef Documentation

◆ CLParamIndexMap

Definition at line 3469 of file CDefView.cpp.

◆ LPLISTVIEW_SORT_INFO

◆ PFNSHGETSETTINGSPROC

typedef void(CALLBACK * PFNSHGETSETTINGSPROC) (LPSHELLFLAGSTATE lpsfs, DWORD dwMask)

Definition at line 379 of file CDefView.cpp.

Function Documentation

◆ CDefView_CreateInstance()

HRESULT CDefView_CreateInstance ( IShellFolder pFolder,
REFIID  riid,
LPVOID ppvOut 
)

Definition at line 3730 of file CDefView.cpp.

3731 {
3732  return ShellObjectCreatorInit<CDefView>(pFolder, riid, ppvOut);
3733 }
REFIID riid
Definition: precomp.h:44

Referenced by SHCreateShellFolderView(), and SHCreateShellFolderViewEx().

◆ ClientToListView()

static void ClientToListView ( HWND  hwndLV,
POINT ppt 
)
static

Definition at line 62 of file CDefView.cpp.

63 {
64  POINT Origin;
65 
66  /* FIXME: LVM_GETORIGIN is broken. See CORE-17266 */
67  if (!ListView_GetOrigin(hwndLV, &Origin))
68  return;
69 
70  ppt->x += Origin.x;
71  ppt->y += Origin.y;
72 }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define ListView_GetOrigin(hwndLV, ppt)
Definition: commctrl.h:2665

Referenced by CDefView::drag_notify_subitem(), CDefView::Drop(), and CDefView::OnNotify().

◆ DrawTileBitmap()

static VOID DrawTileBitmap ( HDC  hDC,
LPCRECT  prc,
HBITMAP  hbm,
INT  nWidth,
INT  nHeight,
INT  dx,
INT  dy 
)
static

Definition at line 1071 of file CDefView.cpp.

1072 {
1073  INT x0 = prc->left, y0 = prc->top, x1 = prc->right, y1 = prc->bottom;
1074  x0 += dx;
1075  y0 += dy;
1076 
1077  HDC hMemDC = CreateCompatibleDC(hDC);
1078  HGDIOBJ hbmOld = SelectObject(hMemDC, hbm);
1079 
1080  for (INT y = y0; y < y1; y += nHeight)
1081  {
1082  for (INT x = x0; x < x1; x += nWidth)
1083  {
1084  BitBlt(hDC, x, y, nWidth, nHeight, hMemDC, 0, 0, SRCCOPY);
1085  }
1086  }
1087 
1088  SelectObject(hMemDC, hbmOld);
1089  DeleteDC(hMemDC);
1090 }
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3706
GLint x0
Definition: linetemp.h:95
GLint dy
Definition: linetemp.h:97
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
static HDC
Definition: imagelist.c:92
LONG top
Definition: windef.h:307
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1499
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
int32_t INT
Definition: typedefs.h:58
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI DeleteDC(_In_ HDC)
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
GLint y0
Definition: linetemp.h:96
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint dx
Definition: linetemp.h:97
LONG bottom
Definition: windef.h:309
_Out_ LPRECT prc
Definition: ntgdi.h:1658
#define SRCCOPY
Definition: wingdi.h:332
static VOID NTAPI BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
Definition: common.c:49

Referenced by CDefView::OnPrintClient().

◆ GetSubmenuByID()

HMENU GetSubmenuByID ( HMENU  hmenu,
UINT  id 
)

Definition at line 1209 of file CDefView.cpp.

1210 {
1211  MENUITEMINFOW mii = {sizeof(mii), MIIM_SUBMENU};
1212  if (::GetMenuItemInfoW(hmenu, id, FALSE, &mii))
1213  return mii.hSubMenu;
1214 
1215  return NULL;
1216 }
static HMENU hmenu
Definition: win.c:66
#define MIIM_SUBMENU
Definition: winuser.h:718
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)

Referenced by CDefView::FillEditMenu(), CDefView::FillFileMenu(), CDefView::FillViewMenu(), and CDefView::OnInitMenuPopup().

◆ ILIsParentOrSpecialParent()

static BOOL ILIsParentOrSpecialParent ( PCIDLIST_ABSOLUTE  pidl1,
PCIDLIST_ABSOLUTE  pidl2 
)
static

Definition at line 2129 of file CDefView.cpp.

2130 {
2131  if (!pidl1 || !pidl2)
2132  return FALSE;
2133  if (ILIsParent(pidl1, pidl2, TRUE))
2134  return TRUE;
2135 
2136  if (_ILIsDesktop(pidl1))
2137  {
2138  PIDLIST_ABSOLUTE deskpidl;
2140  if (ILIsParent(deskpidl, pidl2, TRUE))
2141  {
2142  ILFree(deskpidl);
2143  return TRUE;
2144  }
2145  ILFree(deskpidl);
2147  if (ILIsParent(deskpidl, pidl2, TRUE))
2148  {
2149  ILFree(deskpidl);
2150  return TRUE;
2151  }
2152  ILFree(deskpidl);
2153  }
2154 
2155  WCHAR szPath1[MAX_PATH], szPath2[MAX_PATH];
2156  LPITEMIDLIST pidl2Clone = ILClone(pidl2);
2157  ILRemoveLastID(pidl2Clone);
2158  if (SHGetPathFromIDListW(pidl1, szPath1) &&
2159  SHGetPathFromIDListW(pidl2Clone, szPath2))
2160  {
2161  if (lstrcmpiW(szPath1, szPath2) == 0)
2162  {
2163  ILFree(pidl2Clone);
2164  return TRUE;
2165  }
2166  }
2167  ILFree(pidl2Clone);
2168 
2169  return FALSE;
2170 }
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
#define CSIDL_COMMON_DESKTOPDIRECTORY
Definition: shlobj.h:2036
#define TRUE
Definition: types.h:120
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1294
BOOL WINAPI ILRemoveLastID(LPITEMIDLIST pidl)
Definition: pidl.c:212
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
Definition: CBandSite.h:24
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:34
BOOL WINAPI ILIsParent(LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild, BOOL bImmediate)
Definition: pidl.c:592
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl)
Definition: shellpath.c:2741
#define CSIDL_DESKTOPDIRECTORY
Definition: shlobj.h:2027
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41

Referenced by CDefView::OnChangeNotify().

◆ ReallyGetMenuItemID()

UINT ReallyGetMenuItemID ( HMENU  hmenu,
int  i 
)

Definition at line 1220 of file CDefView.cpp.

1221 {
1222  MENUITEMINFOW mii = {sizeof(mii), MIIM_ID};
1223  if (::GetMenuItemInfoW(hmenu, i, TRUE, &mii))
1224  return mii.wID;
1225 
1226  return UINT_MAX;
1227 }
static HMENU hmenu
Definition: win.c:66
#define TRUE
Definition: types.h:120
GLsizei GLenum const GLvoid GLsizei GLenum 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 const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define MIIM_ID
Definition: winuser.h:717
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
#define UINT_MAX
Definition: limits.h:41

Referenced by CDefView::OnInitMenuPopup().

◆ SelectExtOnRename()

static BOOL SelectExtOnRename ( void  )
static

Definition at line 1837 of file CDefView.cpp.

1838 {
1839  HKEY hKey;
1840  LONG error;
1841  DWORD dwValue = FALSE, cbValue;
1842 
1844  L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer",
1845  0, KEY_READ, &hKey);
1846  if (error)
1847  return dwValue;
1848 
1849  cbValue = sizeof(dwValue);
1850  RegQueryValueExW(hKey, L"SelectExtOnRename", NULL, NULL, (LPBYTE)&dwValue, &cbValue);
1851 
1852  RegCloseKey(hKey);
1853  return !!dwValue;
1854 }
#define error(str)
Definition: mkdosfs.c:1605
#define KEY_READ
Definition: nt_native.h:1023
#define HKEY_CURRENT_USER
Definition: winreg.h:11
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:53
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR L[]
Definition: oid.c:1250
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366

Referenced by CDefView::OnNotify().

◆ SelectionMoveCompareFunc()

static INT CALLBACK SelectionMoveCompareFunc ( LPARAM  lParam1,
LPARAM  lParam2,
LPARAM  lParamSort 
)
static

Definition at line 3472 of file CDefView.cpp.

3473 {
3474  CLParamIndexMap *pmap = (CLParamIndexMap *)lParamSort;
3475  INT i1 = pmap->Lookup(lParam1), i2 = pmap->Lookup(lParam2);
3476  if (i1 < i2)
3477  return -1;
3478  if (i1 > i2)
3479  return 1;
3480  return 0;
3481 }
int32_t INT
Definition: typedefs.h:58
Definition: pmap_prot.h:88

Referenced by CDefView::_MoveSelectionOnAutoArrange().

◆ SHCreateShellFolderView()

HRESULT WINAPI SHCreateShellFolderView ( const SFV_CREATE pcsfv,
IShellView **  ppsv 
)

Definition at line 3755 of file CDefView.cpp.

3757 {
3758  CComPtr<IShellView> psv;
3759  HRESULT hRes;
3760 
3761  if (!ppsv)
3762  return E_INVALIDARG;
3763 
3764  *ppsv = NULL;
3765 
3766  if (!pcsfv || pcsfv->cbSize != sizeof(*pcsfv))
3767  return E_INVALIDARG;
3768 
3769  TRACE("sf=%p outer=%p callback=%p\n",
3770  pcsfv->pshf, pcsfv->psvOuter, pcsfv->psfvcb);
3771 
3772  hRes = CDefView_CreateInstance(pcsfv->pshf, IID_PPV_ARG(IShellView, &psv));
3773  if (FAILED(hRes))
3774  return hRes;
3775 
3776  if (pcsfv->psfvcb)
3777  {
3779  if (SUCCEEDED(psv->QueryInterface(IID_PPV_ARG(IShellFolderView, &sfv))))
3780  {
3781  sfv->SetCallback(pcsfv->psfvcb, NULL);
3782  }
3783  }
3784 
3785  *ppsv = psv.Detach();
3786  return hRes;
3787 }
HRESULT CDefView_CreateInstance(IShellFolder *pFolder, REFIID riid, LPVOID *ppvOut)
Definition: CDefView.cpp:3730
IShellFolderViewCB * psfvcb
Definition: shlobj.h:1285
IShellView * psvOuter
Definition: shlobj.h:1284
#define IID_PPV_ARG(Itype, ppType)
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
IShellFolder * pshf
Definition: shlobj.h:1283
UINT cbSize
Definition: shlobj.h:1282
T * Detach()
Definition: atlcomcli.h:156
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by CFontExt::CreateViewObject(), CFSFolder::CreateViewObject(), CNetFolder::CreateViewObject(), CDrivesFolder::CreateViewObject(), CPrinterFolder::CreateViewObject(), CControlPanelFolder::CreateViewObject(), CFindFolder::CreateViewObject(), CDesktopFolder::CreateViewObject(), CRecycleBin::CreateViewObject(), CZipFolder::CreateViewObject(), CCommonFolder< CRegistryFolder, RegPidlEntry, CRegistryFolderExtractIcon >::CreateViewObject(), START_TEST(), test_SHCreateShellFolderView(), and ShellBrowser::UpdateFolderView().

◆ SHCreateShellFolderViewEx()

HRESULT WINAPI SHCreateShellFolderViewEx ( LPCSFV  psvcbi,
IShellView **  ppsv 
)

Definition at line 3735 of file CDefView.cpp.

3738 {
3739  CComPtr<IShellView> psv;
3740  HRESULT hRes;
3741 
3742  TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n",
3743  psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback,
3744  psvcbi->fvm, psvcbi->psvOuter);
3745 
3746  *ppsv = NULL;
3747  hRes = CDefView_CreateInstance(psvcbi->pshf, IID_PPV_ARG(IShellView, &psv));
3748  if (FAILED_UNEXPECTEDLY(hRes))
3749  return hRes;
3750 
3751  *ppsv = psv.Detach();
3752  return hRes;
3753 }
HRESULT CDefView_CreateInstance(IShellFolder *pFolder, REFIID riid, LPVOID *ppvOut)
Definition: CDefView.cpp:3730
LPFNVIEWCALLBACK pfnCallback
Definition: shlobj.h:1208
#define IID_PPV_ARG(Itype, ppType)
IShellView * psvOuter
Definition: shlobj.h:1205
smooth NULL
Definition: ftsmooth.c:416
PCIDLIST_ABSOLUTE pidl
Definition: shlobj.h:1206
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
FOLDERVIEWMODE fvm
Definition: shlobj.h:1209
IShellFolder * pshf
Definition: shlobj.h:1204
T * Detach()
Definition: atlcomcli.h:156

Referenced by CNetworkConnections::CreateViewObject(), CDesktopBrowser::Initialize(), and test_SHCreateShellFolderViewEx().

◆ SHGetMenuIdFromMenuMsg()

HRESULT SHGetMenuIdFromMenuMsg ( UINT  uMsg,
LPARAM  lParam,
UINT CmdId 
)

Definition at line 1421 of file CDefaultContextMenu.cpp.

1422 {
1423  if (uMsg == WM_DRAWITEM)
1424  {
1425  DRAWITEMSTRUCT* pDrawStruct = reinterpret_cast<DRAWITEMSTRUCT*>(lParam);
1426  *CmdId = pDrawStruct->itemID;
1427  return S_OK;
1428  }
1429  else if (uMsg == WM_MEASUREITEM)
1430  {
1431  MEASUREITEMSTRUCT* pMeasureStruct = reinterpret_cast<MEASUREITEMSTRUCT*>(lParam);
1432  *CmdId = pMeasureStruct->itemID;
1433  return S_OK;
1434  }
1435 
1436  return E_FAIL;
1437 }
#define E_FAIL
Definition: ddrawi.h:102
#define WM_MEASUREITEM
Definition: winuser.h:1628
#define S_OK
Definition: intsafe.h:59
#define WM_DRAWITEM
Definition: winuser.h:1627
LPARAM lParam
Definition: combotst.c:139

Referenced by CDefaultContextMenu::HandleMenuMsg2(), and CDefView::OnCustomItem().

◆ SHMenuIndexFromID()

DWORD WINAPI SHMenuIndexFromID ( HMENU  hMenu,
UINT  uID 
)

Definition at line 4391 of file ordinal.c.

4392 {
4393  TRACE("%p %u\n", hMenu, uID);
4394  return GetMenuPosFromID(hMenu, uID);
4395 }
INT WINAPI GetMenuPosFromID(HMENU hMenu, UINT wID)
Definition: ordinal.c:4364
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by CDefView::FillViewMenu().

◆ SHSetMenuIdInMenuMsg()

HRESULT SHSetMenuIdInMenuMsg ( UINT  uMsg,
LPARAM  lParam,
UINT  CmdId 
)

Definition at line 1439 of file CDefaultContextMenu.cpp.

1440 {
1441  if (uMsg == WM_DRAWITEM)
1442  {
1443  DRAWITEMSTRUCT* pDrawStruct = reinterpret_cast<DRAWITEMSTRUCT*>(lParam);
1444  pDrawStruct->itemID = CmdId;
1445  return S_OK;
1446  }
1447  else if (uMsg == WM_MEASUREITEM)
1448  {
1449  MEASUREITEMSTRUCT* pMeasureStruct = reinterpret_cast<MEASUREITEMSTRUCT*>(lParam);
1450  pMeasureStruct->itemID = CmdId;
1451  return S_OK;
1452  }
1453 
1454  return E_FAIL;
1455 }
#define E_FAIL
Definition: ddrawi.h:102
#define WM_MEASUREITEM
Definition: winuser.h:1628
#define S_OK
Definition: intsafe.h:59
#define WM_DRAWITEM
Definition: winuser.h:1627
LPARAM lParam
Definition: combotst.c:139

Referenced by CDefaultContextMenu::HandleMenuMsg2(), and CDefView::OnCustomItem().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )

Variable Documentation

◆ SV_CLASS_NAME

const WCHAR SV_CLASS_NAME[] = {'S', 'H', 'E', 'L', 'L', 'D', 'L', 'L', '_', 'D', 'e', 'f', 'V', 'i', 'e', 'w', 0}
static

Definition at line 45 of file CDefView.cpp.

Referenced by CDefView::GetWndClassInfo().