ReactOS 0.4.15-dev-7924-g5949c20
CtxMenuInterfaces Struct Reference

#include <shellclasses.h>

Collaboration diagram for CtxMenuInterfaces:

Public Member Functions

 CtxMenuInterfaces ()
 
void reset ()
 
bool HandleMenuMsg (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
IContextMenuquery_interfaces (IContextMenu *pcm1)
 

Public Attributes

IContextMenu2_pctxmenu2
 
IContextMenu3_pctxmenu3
 

Detailed Description

Definition at line 1104 of file shellclasses.h.

Constructor & Destructor Documentation

◆ CtxMenuInterfaces()

CtxMenuInterfaces::CtxMenuInterfaces ( )
inline

Definition at line 1106 of file shellclasses.h.

1107 {
1108 reset();
1109 }

Member Function Documentation

◆ HandleMenuMsg()

bool CtxMenuInterfaces::HandleMenuMsg ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
)

Definition at line 489 of file shellclasses.cpp.

490{
491 if (_pctxmenu3) {
493 return true;
494 }
495
496 if (_pctxmenu2)
498 return true;
499
500 return false;
501}
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
HRESULT HandleMenuMsg([in] UINT uMsg, [in] WPARAM wParam, [in] LPARAM lParam)
#define SUCCEEDED(hr)
Definition: intsafe.h:50
IContextMenu2 * _pctxmenu2
IContextMenu3 * _pctxmenu3

Referenced by ExtContextMenuHandlerT< BASE >::WndProc().

◆ query_interfaces()

IContextMenu * CtxMenuInterfaces::query_interfaces ( IContextMenu pcm1)

Definition at line 503 of file shellclasses.cpp.

504{
505 IContextMenu* pcm = NULL;
506
507 reset();
508
509 // Get the higher version context menu interfaces.
510 if (pcm1->QueryInterface(IID_IContextMenu3, (void**)&pcm) == NOERROR)
511 _pctxmenu3 = (LPCONTEXTMENU3)pcm;
512 else
513 if (pcm1->QueryInterface(IID_IContextMenu2, (void**)&pcm) == NOERROR)
514 _pctxmenu2 = (LPCONTEXTMENU2)pcm;
515
516 if (pcm) {
517 pcm1->Release();
518 return pcm;
519 } else
520 return pcm1;
521}
#define NULL
Definition: types.h:112
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
ULONG Release()
#define NOERROR
Definition: winerror.h:2354

Referenced by DesktopShellView::DoDesktopContextMenu(), and ShellFolderContextMenu().

◆ reset()

void CtxMenuInterfaces::reset ( )

Member Data Documentation

◆ _pctxmenu2

IContextMenu2* CtxMenuInterfaces::_pctxmenu2

Definition at line 1115 of file shellclasses.h.

Referenced by HandleMenuMsg(), query_interfaces(), and reset().

◆ _pctxmenu3

IContextMenu3* CtxMenuInterfaces::_pctxmenu3

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