ReactOS  0.4.13-dev-73-gcfe54aa
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 }
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
HRESULT HandleMenuMsg([in] UINT uMsg, [in] WPARAM wParam, [in] LPARAM lParam)
IContextMenu3 * _pctxmenu3
IContextMenu2 * _pctxmenu2
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static UINT WPARAM wparam
Definition: combo.c:716

Referenced by ExtContextMenuHandlerT< ShellBrowserChildT< ChildWindow > >::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 NOERROR
Definition: winerror.h:2354
ULONG Release()
smooth NULL
Definition: ftsmooth.c:416
IContextMenu3 * _pctxmenu3
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
IContextMenu2 * _pctxmenu2

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

◆ reset()

void CtxMenuInterfaces::reset ( void  )

Definition at line 483 of file shellclasses.cpp.

484 {
485  _pctxmenu2 = NULL;
486  _pctxmenu3 = NULL;
487 }
smooth NULL
Definition: ftsmooth.c:416
IContextMenu3 * _pctxmenu3
IContextMenu2 * _pctxmenu2

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

Member Data Documentation

◆ _pctxmenu2

IContextMenu2* CtxMenuInterfaces::_pctxmenu2

Definition at line 1115 of file shellclasses.h.

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

◆ _pctxmenu3


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