#include <COpenWithMenu.h>
|
| COpenWithMenu () |
|
| ~COpenWithMenu () |
|
virtual HRESULT WINAPI | QueryContextMenu (HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) |
|
virtual HRESULT WINAPI | InvokeCommand (LPCMINVOKECOMMANDINFO lpcmi) |
|
virtual HRESULT WINAPI | GetCommandString (UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) |
|
virtual HRESULT WINAPI | HandleMenuMsg (UINT uMsg, WPARAM wParam, LPARAM lParam) |
|
virtual HRESULT STDMETHODCALLTYPE | Initialize (PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) |
|
| ~CComObjectRootEx () |
|
ULONG | InternalAddRef () |
|
ULONG | InternalRelease () |
|
void | Lock () |
|
void | Unlock () |
|
HRESULT | _AtlInitialConstruct () |
|
| CComObjectRootBase () |
|
| ~CComObjectRootBase () |
|
void | SetVoid (void *) |
|
HRESULT | _AtlFinalConstruct () |
|
HRESULT | FinalConstruct () |
|
void | InternalFinalConstructAddRef () |
|
void | InternalFinalConstructRelease () |
|
void | FinalRelease () |
|
HRESULT | HandleMenuMsg ([in] UINT uMsg, [in] WPARAM wParam, [in] LPARAM lParam) |
|
HRESULT | QueryContextMenu ([in] HMENU hmenu, [in] UINT indexMenu, [in] UINT idCmdFirst, [in] UINT idCmdLast, [in] UINT uFlags) |
|
HRESULT | InvokeCommand ([in] LPCMINVOKECOMMANDINFO lpici) |
|
HRESULT | GetCommandString ([in] UINT_PTR idCmd, [in] UINT uType, [out] UINT *pwReserved, [out, size_is(cchMax)] LPSTR pszName, [in] UINT cchMax) |
|
HRESULT | QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject) |
|
ULONG | AddRef () |
|
ULONG | Release () |
|
HRESULT | Initialize ([in] PCIDLIST_ABSOLUTE pidlFolder, [in] IDataObject *pdtobj, [in] HKEY hkeyProgID) |
|
Definition at line 28 of file COpenWithMenu.h.
◆ COpenWithMenu()
COpenWithMenu::COpenWithMenu |
( |
| ) |
|
◆ ~COpenWithMenu()
COpenWithMenu::~COpenWithMenu |
( |
| ) |
|
Definition at line 1104 of file COpenWithMenu.cpp.
1105{
1106 TRACE(
"Destroying COpenWithMenu(%p)\n",
this);
1107
1109 {
1112
1113
1116 return;
1117
1118
1120 mii.
cbSize =
sizeof(mii);
1122
1124 {
1126 {
1129 }
1130 }
1131 }
1132
1135}
_In_ WDFCOLLECTION _In_ ULONG Index
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
◆ AddApp()
Definition at line 1188 of file COpenWithMenu.cpp.
1189{
1192
1194 mii.
cbSize =
sizeof(mii);
1202
1205 {
1208 }
1209
1212}
static LPCWSTR GetName(SApp *pApp)
static HICON GetIcon(SApp *pApp)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
Referenced by QueryContextMenu().
◆ AddChooseProgramItem()
VOID COpenWithMenu::AddChooseProgramItem |
( |
| ) |
|
|
private |
Definition at line 1160 of file COpenWithMenu.cpp.
1161{
1164
1166 mii.
cbSize =
sizeof(mii);
1171
1173 {
1174 ERR(
"Failed to load string\n");
1175 return;
1176 }
1177
1184
1186}
#define shell32_hInstance
#define IDS_OPEN_WITH_CHOOSE
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
Referenced by QueryContextMenu().
◆ GetCommandString()
◆ HandleMenuMsg()
◆ IconToBitmap()
Definition at line 1137 of file COpenWithMenu.cpp.
1138{
1142
1148
1154
1156
1158}
DWORD WINAPI GetLastError(void)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
HDC WINAPI GetDC(_In_opt_ HWND)
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
Referenced by AddApp().
◆ Initialize()
Implements IShellExtInit.
Definition at line 1351 of file COpenWithMenu.cpp.
1354{
1357
1358 TRACE(
"This %p\n",
this);
1359
1362
1363 CDataObjectHIDA pida(pdtobj);
1365 {
1366 ERR(
"pdtobj->GetData failed with 0x%x\n", pida.hr());
1367 return pida.hr();
1368 }
1369
1371
1374
1376 {
1377 TRACE(
"pidl is not a file\n");
1379 }
1380
1382 if (!pidl)
1383 {
1386 }
1387
1389 {
1390 ERR(
"SHGetPathFromIDListW failed\n");
1392 }
1393
1395
1398 {
1399 TRACE(
"file is a executable or shortcut\n");
1401 }
1402
1404}
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
BOOL _ILIsValue(LPCITEMIDLIST pidl)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static PCUIDLIST_RELATIVE HIDA_GetPIDLItem(CIDA const *pida, SIZE_T i)
static PCUIDLIST_ABSOLUTE HIDA_GetPIDLFolder(CIDA const *pida)
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
◆ InvokeCommand()
Implements IContextMenu.
Definition at line 1289 of file COpenWithMenu.cpp.
1290{
1292
1294
1296 {
1298 {
1301
1304 if (pwszExt[0])
1308 }
1309 else
1310 {
1311
1314 mii.
cbSize =
sizeof(mii);
1316
1318 {
1319
1323 }
1324 }
1325 }
1326
1328}
static BOOL Execute(SApp *pApp, LPCWSTR pwszFilePath)
@ OAIF_ALLOW_REGISTRATION
◆ QueryContextMenu()
Implements IContextMenu.
Definition at line 1214 of file COpenWithMenu.cpp.
1220{
1221 TRACE(
"hMenu %p indexMenu %u idFirst %u idLast %u uFlags %u\n", hMenu, indexMenu, idCmdFirst, idCmdLast,
uFlags);
1222
1224
1228 {
1229 ERR(
"Failed to load string\n");
1231 }
1232
1233
1236
1237
1238 if (DefaultPos != -1)
1239 {
1240
1243
1244
1246 {
1248
1250 {
1254 }
1255
1257 }
1258 }
1259
1260
1263 mii.
cbSize =
sizeof(mii);
1266 {
1270 }
1271 else
1273
1277
1279 if (DefaultPos == -1)
1281
1284
1286}
BOOL LoadRecommended(LPCWSTR pwszFilePath)
UINT GetRecommendedCount()
#define MAKE_HRESULT(sev, fac, code)
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
HMENU WINAPI CreatePopupMenu(void)
UINT WINAPI GetMenuDefaultItem(_In_ HMENU hMenu, _In_ UINT fByPos, _In_ UINT gmdiFlags)
◆ m_hSubMenu
HMENU COpenWithMenu::m_hSubMenu |
|
private |
◆ m_idCmdFirst
UINT COpenWithMenu::m_idCmdFirst |
|
private |
◆ m_idCmdLast
UINT COpenWithMenu::m_idCmdLast |
|
private |
◆ m_pAppList
◆ m_wszPath
The documentation for this class was generated from the following files: