ReactOS 0.4.15-dev-7958-gcd0bb1a
ExtContextMenuHandlerT< BASE > Struct Template Reference

#include <shellclasses.h>

Inheritance diagram for ExtContextMenuHandlerT< BASE >:
Collaboration diagram for ExtContextMenuHandlerT< BASE >:

Public Types

typedef BASE super
 

Public Member Functions

 ExtContextMenuHandlerT (HWND hwnd)
 
template<typename PARA >
 ExtContextMenuHandlerT (HWND hwnd, const PARA &info)
 
LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 

Protected Attributes

CtxMenuInterfaces _cm_ifs
 

Detailed Description

template<typename BASE>
struct ExtContextMenuHandlerT< BASE >

Definition at line 1120 of file shellclasses.h.

Member Typedef Documentation

◆ super

template<typename BASE >
typedef BASE ExtContextMenuHandlerT< BASE >::super

Definition at line 1123 of file shellclasses.h.

Constructor & Destructor Documentation

◆ ExtContextMenuHandlerT() [1/2]

Definition at line 1125 of file shellclasses.h.

1126 : super(hwnd)
1127 {
1128 }
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ ExtContextMenuHandlerT() [2/2]

template<typename BASE >
template<typename PARA >
ExtContextMenuHandlerT< BASE >::ExtContextMenuHandlerT ( HWND  hwnd,
const PARA &  info 
)
inline

Definition at line 1130 of file shellclasses.h.

1131 : super(hwnd, info)
1132 {
1133 }

Member Function Documentation

◆ WndProc()

template<typename BASE >
LRESULT ExtContextMenuHandlerT< BASE >::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
)
inline

Definition at line 1135 of file shellclasses.h.

1136 {
1137 switch(nmsg) {
1138 case WM_DRAWITEM:
1139 case WM_MEASUREITEM:
1140 if (!wparam) // Is the message menu-related?
1141 if (_cm_ifs.HandleMenuMsg(nmsg, wparam, lparam))
1142 return TRUE;
1143
1144 break;
1145
1146 case WM_INITMENUPOPUP:
1147 if (_cm_ifs.HandleMenuMsg(nmsg, wparam, lparam))
1148 return 0;
1149
1150 break;
1151
1152 case WM_MENUCHAR: // only supported by IContextMenu3
1153 if (_cm_ifs._pctxmenu3) {
1154 LRESULT lResult = 0;
1155
1156 _cm_ifs._pctxmenu3->HandleMenuMsg2(nmsg, wparam, lparam, &lResult);
1157
1158 return lResult;
1159 }
1160
1161 return 0;
1162 }
1163
1164 return super::WndProc(nmsg, wparam, lparam);
1165 }
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
#define TRUE
Definition: types.h:120
HRESULT HandleMenuMsg2([in] UINT uMsg, [in] WPARAM wParam, [in] LPARAM lParam, [out] LRESULT *plResult)
bool HandleMenuMsg(UINT nmsg, WPARAM wparam, LPARAM lparam)
IContextMenu3 * _pctxmenu3
CtxMenuInterfaces _cm_ifs
LONG_PTR LRESULT
Definition: windef.h:209
#define WM_DRAWITEM
Definition: winuser.h:1645
#define WM_MENUCHAR
Definition: winuser.h:1748
#define WM_INITMENUPOPUP
Definition: winuser.h:1746
#define WM_MEASUREITEM
Definition: winuser.h:1646

Member Data Documentation

◆ _cm_ifs

template<typename BASE >
CtxMenuInterfaces ExtContextMenuHandlerT< BASE >::_cm_ifs
protected

Definition at line 1168 of file shellclasses.h.

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


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