⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tshellctxmenu.h

📁 This ZIP archive includes the sources (and executable) for the FileTest utility, written by Ladisla
💻 H
字号:
/*****************************************************************************/
/* TShellCtxMenu.h                        Copyright (c) Ladislav Zezula 2004 */
/*---------------------------------------------------------------------------*/
/* Description:                                                              */
/*---------------------------------------------------------------------------*/
/*   Date    Ver   Who  Comment                                              */
/* --------  ----  ---  -------                                              */
/* 01.07.04  1.00  Lad  The first version of TShellCtxMenu.h                 */
/*****************************************************************************/

#ifndef __TSHELLCTXMENU_H__
#define __TSHELLCTXMENU_H__

#include <shlobj.h>

class TShellContextMenu
{
public:

    TShellContextMenu();
    virtual ~TShellContextMenu();

    int AddFile(const TCHAR * szFileName);
    int RunMenu(HWND hWndParent, POINT pt);

protected:

    static LRESULT CALLBACK HookWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

    int GetPIDLCount(LPCITEMIDLIST pidl);
    UINT GetPIDLSize(LPCITEMIDLIST pidl);
    void FreePIDLList(LPITEMIDLIST * ppItemIDList, DWORD nItems);
    LPBYTE GetPIDLPos(LPCITEMIDLIST pidl, int nPos);
    LPITEMIDLIST CopyPIDL(LPCITEMIDLIST pidl, INT_PTR cb = -1);

    int GetIContextMenu(HWND hWndParent, IContextMenu ** pContextMenu, DWORD * pdwVersion);
    HRESULT SHBindToParentEx(LPCITEMIDLIST pidl, REFIID riid, VOID ** ppv, LPCITEMIDLIST * ppidlLast);

    LPITEMIDLIST * m_ppItemIDList;      // Item ID list
    IShellFolder * m_pShellFolder;      // IShellFolder relative to the parent
    OLECHAR     ** m_ppFileNames;
    DWORD          m_dwFiles;
    HANDLE         m_hHeap;
};


#endif // __TSHELLCTXMENU_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -