ReactOS 0.4.15-dev-8028-g8e799e2
CDefView.cpp File Reference
#include "precomp.h"
#include <atlwin.h>
#include <ui/rosctrls.h>
Include dependency graph for CDefView.cpp:

Go to the source code of this file.

Classes

struct  LISTVIEW_SORT_INFO
 
struct  MenuCleanup
 
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 UINT GetContextMenuFlags (IShellBrowser *pSB, SFGAOF sfgao)
 
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)
 

Macro Definition Documentation

◆ CONTEXT_MENU_BASE_ID

#define CONTEXT_MENU_BASE_ID   1

Definition at line 55 of file CDefView.cpp.

◆ GET_WM_COMMAND_CMD

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

Definition at line 430 of file CDefView.cpp.

◆ GET_WM_COMMAND_HWND

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

Definition at line 429 of file CDefView.cpp.

◆ GET_WM_COMMAND_ID

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

Definition at line 428 of file CDefView.cpp.

◆ ID_LISTVIEW

#define ID_LISTVIEW   1

Definition at line 425 of file CDefView.cpp.

◆ IDM_MYFILEITEM

#define IDM_MYFILEITEM   (FCIDM_SHVIEWFIRST + 0x502)

Definition at line 423 of file CDefView.cpp.

◆ IDM_VIEW_FILES

#define IDM_VIEW_FILES   (FCIDM_SHVIEWFIRST + 0x500)

Definition at line 421 of file CDefView.cpp.

◆ IDM_VIEW_IDW

#define IDM_VIEW_IDW   (FCIDM_SHVIEWFIRST + 0x501)

Definition at line 422 of file CDefView.cpp.

◆ SCROLLAREAWIDTH

#define SCROLLAREAWIDTH   20

Definition at line 3327 of file CDefView.cpp.

◆ SHV_CHANGE_NOTIFY

#define SHV_CHANGE_NOTIFY   WM_USER + 0x1111

Definition at line 51 of file CDefView.cpp.

Typedef Documentation

◆ CLParamIndexMap

Definition at line 3601 of file CDefView.cpp.

◆ LPLISTVIEW_SORT_INFO

◆ PFNSHGETSETTINGSPROC

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

Definition at line 432 of file CDefView.cpp.

Function Documentation

◆ CDefView_CreateInstance()

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

Definition at line 3850 of file CDefView.cpp.

3851{
3852 return ShellObjectCreatorInit<CDefView>(pFolder, riid, ppvOut);
3853}
REFIID riid
Definition: atlbase.h:39

Referenced by SHCreateShellFolderView(), and SHCreateShellFolderViewEx().

◆ ClientToListView()

static void ClientToListView ( HWND  hwndLV,
POINT ppt 
)
static

Definition at line 73 of file CDefView.cpp.

74{
75 POINT Origin = {};
76
77 // FIXME: LVM_GETORIGIN is broken. See CORE-17266
78 if (!ListView_GetOrigin(hwndLV, &Origin))
79 return;
80
81 ppt->x += Origin.x;
82 ppt->y += Origin.y;
83}
#define ListView_GetOrigin(hwndLV, ppt)
Definition: commctrl.h:2669
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48

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 1193 of file CDefView.cpp.

1194{
1195 INT x0 = prc->left, y0 = prc->top, x1 = prc->right, y1 = prc->bottom;
1196 x0 += dx;
1197 y0 += dy;
1198
1199 HDC hMemDC = CreateCompatibleDC(hDC);
1200 HGDIOBJ hbmOld = SelectObject(hMemDC, hbm);
1201
1202 for (INT y = y0; y < y1; y += nHeight)
1203 {
1204 for (INT x = x0; x < x1; x += nWidth)
1205 {
1206 BitBlt(hDC, x, y, nWidth, nHeight, hMemDC, 0, 0, SRCCOPY);
1207 }
1208 }
1209
1210 SelectObject(hMemDC, hbmOld);
1211 DeleteDC(hMemDC);
1212}
static HDC hDC
Definition: 3dtext.c:33
static VOID 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:57
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint dy
Definition: linetemp.h:97
GLint y0
Definition: linetemp.h:96
GLint x0
Definition: linetemp.h:95
GLint dx
Definition: linetemp.h:97
static HDC
Definition: imagelist.c:92
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
_Out_ LPRECT prc
Definition: ntgdi.h:1658
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
int32_t INT
Definition: typedefs.h:58
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3709
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3708
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define SRCCOPY
Definition: wingdi.h:333
BOOL WINAPI DeleteDC(_In_ HDC)

Referenced by CDefView::OnPrintClient().

◆ GetContextMenuFlags()

static UINT GetContextMenuFlags ( IShellBrowser pSB,
SFGAOF  sfgao 
)
static

Definition at line 58 of file CDefView.cpp.

59{
60 UINT cmf = CMF_NORMAL;
61 if (GetKeyState(VK_SHIFT) < 0)
62 cmf |= CMF_EXTENDEDVERBS;
63 if (sfgao & SFGAO_CANRENAME)
64 cmf |= CMF_CANRENAME;
65 HWND hwnd = NULL;
66 if (pSB && SUCCEEDED(pSB->GetControlWindow(FCW_TREE, &hwnd)) && hwnd)
67 cmf |= CMF_EXPLORE;
68 return cmf;
69}
#define NULL
Definition: types.h:112
HRESULT GetControlWindow([in] UINT id, [out] HWND *phwnd)
#define SUCCEEDED(hr)
Definition: intsafe.h:50
unsigned int UINT
Definition: ndis.h:50
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define VK_SHIFT
Definition: winuser.h:2202
SHORT WINAPI GetKeyState(_In_ int)

Referenced by CDefView::FillFileMenu(), CDefView::OnContextMenu(), and CDefView::OpenSelectedItems().

◆ GetSubmenuByID()

HMENU GetSubmenuByID ( HMENU  hmenu,
UINT  id 
)

Definition at line 1339 of file CDefView.cpp.

1340{
1341 MENUITEMINFOW mii = {sizeof(mii), MIIM_SUBMENU};
1342 if (::GetMenuItemInfoW(hmenu, id, FALSE, &mii))
1343 return mii.hSubMenu;
1344
1345 return NULL;
1346}
#define FALSE
Definition: types.h:117
static HMENU hmenu
Definition: win.c:66
#define MIIM_SUBMENU
Definition: winuser.h:723
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 2238 of file CDefView.cpp.

2239{
2240 if (!pidl1 || !pidl2)
2241 return FALSE;
2242 if (ILIsParent(pidl1, pidl2, TRUE))
2243 return TRUE;
2244
2245 if (_ILIsDesktop(pidl1))
2246 {
2247 PIDLIST_ABSOLUTE deskpidl;
2249 if (ILIsParent(deskpidl, pidl2, TRUE))
2250 {
2251 ILFree(deskpidl);
2252 return TRUE;
2253 }
2254 ILFree(deskpidl);
2256 if (ILIsParent(deskpidl, pidl2, TRUE))
2257 {
2258 ILFree(deskpidl);
2259 return TRUE;
2260 }
2261 ILFree(deskpidl);
2262 }
2263
2264 WCHAR szPath1[MAX_PATH], szPath2[MAX_PATH];
2265 LPITEMIDLIST pidl2Clone = ILClone(pidl2);
2266 ILRemoveLastID(pidl2Clone);
2267 if (SHGetPathFromIDListW(pidl1, szPath1) &&
2268 SHGetPathFromIDListW(pidl2Clone, szPath2))
2269 {
2270 if (lstrcmpiW(szPath1, szPath2) == 0)
2271 {
2272 ILFree(pidl2Clone);
2273 return TRUE;
2274 }
2275 }
2276 ILFree(pidl2Clone);
2277
2278 return FALSE;
2279}
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
Definition: CBandSite.h:24
#define TRUE
Definition: types.h:120
#define MAX_PATH
Definition: compat.h:34
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4261
HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl)
Definition: shellpath.c:3124
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:237
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:938
BOOL WINAPI ILIsParent(LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild, BOOL bImmediate)
Definition: pidl.c:605
BOOL WINAPI ILRemoveLastID(LPITEMIDLIST pidl)
Definition: pidl.c:221
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1353
#define CSIDL_COMMON_DESKTOPDIRECTORY
Definition: shlobj.h:2182
#define CSIDL_DESKTOPDIRECTORY
Definition: shlobj.h:2173
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CDefView::OnChangeNotify().

◆ ReallyGetMenuItemID()

UINT ReallyGetMenuItemID ( HMENU  hmenu,
int  i 
)

Definition at line 1350 of file CDefView.cpp.

1351{
1352 MENUITEMINFOW mii = {sizeof(mii), MIIM_ID};
1353 if (::GetMenuItemInfoW(hmenu, i, TRUE, &mii))
1354 return mii.wID;
1355
1356 return UINT_MAX;
1357}
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 UINT_MAX
Definition: limits.h:41
#define MIIM_ID
Definition: winuser.h:722

Referenced by CDefView::OnInitMenuPopup().

◆ SelectExtOnRename()

static BOOL SelectExtOnRename ( void  )
static

Definition at line 1973 of file CDefView.cpp.

1974{
1975 HKEY hKey;
1976 LONG error;
1977 DWORD dwValue = FALSE, cbValue;
1978
1980 L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer",
1981 0, KEY_READ, &hKey);
1982 if (error)
1983 return dwValue;
1984
1985 cbValue = sizeof(dwValue);
1986 RegQueryValueExW(hKey, L"SelectExtOnRename", NULL, NULL, (LPBYTE)&dwValue, &cbValue);
1987
1989 return !!dwValue;
1990}
#define RegCloseKey(hKey)
Definition: registry.h:49
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
#define error(str)
Definition: mkdosfs.c:1605
#define KEY_READ
Definition: nt_native.h:1023
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
unsigned char * LPBYTE
Definition: typedefs.h:53
#define HKEY_CURRENT_USER
Definition: winreg.h:11

Referenced by CDefView::OnNotify().

◆ SelectionMoveCompareFunc()

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

Definition at line 3604 of file CDefView.cpp.

3605{
3606 CLParamIndexMap *pmap = (CLParamIndexMap *)lParamSort;
3607 INT i1 = pmap->Lookup(lParam1), i2 = pmap->Lookup(lParam2);
3608 if (i1 < i2)
3609 return -1;
3610 if (i1 > i2)
3611 return 1;
3612 return 0;
3613}
Definition: pmap_prot.h:88

Referenced by CDefView::_MoveSelectionOnAutoArrange().

◆ SHCreateShellFolderView()

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

Definition at line 3875 of file CDefView.cpp.

3877{
3879 HRESULT hRes;
3880
3881 if (!ppsv)
3882 return E_INVALIDARG;
3883
3884 *ppsv = NULL;
3885
3886 if (!pcsfv || pcsfv->cbSize != sizeof(*pcsfv))
3887 return E_INVALIDARG;
3888
3889 TRACE("sf=%p outer=%p callback=%p\n",
3890 pcsfv->pshf, pcsfv->psvOuter, pcsfv->psfvcb);
3891
3892 hRes = CDefView_CreateInstance(pcsfv->pshf, IID_PPV_ARG(IShellView, &psv));
3893 if (FAILED(hRes))
3894 return hRes;
3895
3896 if (pcsfv->psfvcb)
3897 {
3899 if (SUCCEEDED(psv->QueryInterface(IID_PPV_ARG(IShellFolderView, &sfv))))
3900 {
3901 sfv->SetCallback(pcsfv->psfvcb, NULL);
3902 }
3903 }
3904
3905 *ppsv = psv.Detach();
3906 return hRes;
3907}
HRESULT CDefView_CreateInstance(IShellFolder *pFolder, REFIID riid, LPVOID *ppvOut)
Definition: CDefView.cpp:3850
T * Detach()
Definition: atlcomcli.h:186
#define E_INVALIDARG
Definition: ddrawi.h:101
#define FAILED(hr)
Definition: intsafe.h:51
#define TRACE(s)
Definition: solgame.cpp:4
IShellFolderViewCB * psfvcb
Definition: shlobj.h:1351
IShellView * psvOuter
Definition: shlobj.h:1350
UINT cbSize
Definition: shlobj.h:1348
IShellFolder * pshf
Definition: shlobj.h:1349
#define IID_PPV_ARG(Itype, ppType)

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

◆ SHCreateShellFolderViewEx()

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

Definition at line 3855 of file CDefView.cpp.

3858{
3860 HRESULT hRes;
3861
3862 TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n",
3863 psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback,
3864 psvcbi->fvm, psvcbi->psvOuter);
3865
3866 *ppsv = NULL;
3867 hRes = CDefView_CreateInstance(psvcbi->pshf, IID_PPV_ARG(IShellView, &psv));
3868 if (FAILED_UNEXPECTEDLY(hRes))
3869 return hRes;
3870
3871 *ppsv = psv.Detach();
3872 return hRes;
3873}
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
FOLDERVIEWMODE fvm
Definition: shlobj.h:1275
IShellView * psvOuter
Definition: shlobj.h:1271
LPFNVIEWCALLBACK pfnCallback
Definition: shlobj.h:1274
PCIDLIST_ABSOLUTE pidl
Definition: shlobj.h:1272
IShellFolder * pshf
Definition: shlobj.h:1270

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

◆ SHGetMenuIdFromMenuMsg()

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

Definition at line 1557 of file CDefaultContextMenu.cpp.

1558{
1559 if (uMsg == WM_DRAWITEM)
1560 {
1561 DRAWITEMSTRUCT* pDrawStruct = reinterpret_cast<DRAWITEMSTRUCT*>(lParam);
1562 *CmdId = pDrawStruct->itemID;
1563 return S_OK;
1564 }
1565 else if (uMsg == WM_MEASUREITEM)
1566 {
1567 MEASUREITEMSTRUCT* pMeasureStruct = reinterpret_cast<MEASUREITEMSTRUCT*>(lParam);
1568 *CmdId = pMeasureStruct->itemID;
1569 return S_OK;
1570 }
1571
1572 return E_FAIL;
1573}
LPARAM lParam
Definition: combotst.c:139
#define E_FAIL
Definition: ddrawi.h:102
#define S_OK
Definition: intsafe.h:52
#define WM_DRAWITEM
Definition: winuser.h:1645
#define WM_MEASUREITEM
Definition: winuser.h:1646

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

◆ SHMenuIndexFromID()

DWORD WINAPI SHMenuIndexFromID ( HMENU  hMenu,
UINT  uID 
)

Definition at line 4504 of file ordinal.c.

4505{
4506 TRACE("%p %u\n", hMenu, uID);
4507 return GetMenuPosFromID(hMenu, uID);
4508}
INT WINAPI GetMenuPosFromID(HMENU hMenu, UINT wID)
Definition: ordinal.c:4477

Referenced by CDefView::FillViewMenu().

◆ SHSetMenuIdInMenuMsg()

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

Definition at line 1575 of file CDefaultContextMenu.cpp.

1576{
1577 if (uMsg == WM_DRAWITEM)
1578 {
1579 DRAWITEMSTRUCT* pDrawStruct = reinterpret_cast<DRAWITEMSTRUCT*>(lParam);
1580 pDrawStruct->itemID = CmdId;
1581 return S_OK;
1582 }
1583 else if (uMsg == WM_MEASUREITEM)
1584 {
1585 MEASUREITEMSTRUCT* pMeasureStruct = reinterpret_cast<MEASUREITEMSTRUCT*>(lParam);
1586 pMeasureStruct->itemID = CmdId;
1587 return S_OK;
1588 }
1589
1590 return E_FAIL;
1591}

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

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )