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

📄 menubackground.h

📁 一个不同目录中多个文件拷贝的助手程序
💻 H
字号:
//-----------------------------------------------------------------------//
// This is a part of the Multicopier.									 //	
// Autor  :  Ahmed Ismaiel Zakaria										 //
// (C) 2002 FCIS Egypt  All rights reserved								 //
// This code is provided "as is", with absolutely no warranty expressed  //
// or implied. Any use is at your own risk.								 //		
// You must obtain the author's consent before you can include this code //
// in a software library.												 //
// If the source code in  this file is used in any application			 //
// then acknowledgement must be made to the author of this program		 //	
// ahmed_ismaiel@hotmail.com											 //
//-----------------------------------------------------------------------//

// MenuBackground.h : Declaration of the CMenuBackground

#ifndef __MENUBACKGROUND_H_
#define __MENUBACKGROUND_H_

#include "resource.h"       // main symbols

#pragma comment(lib, "comctl32.lib")


#include <comdef.h>
#include <shlobj.h>
#include <string>
#include <list> 

using namespace std;

#ifdef _UNICODE
#define string wstring
#endif

typedef list<string> STRINGLIST;

/////////////////////////////////////////////////////////////////////////////
// CMenuBackground
class ATL_NO_VTABLE CMenuBackground : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CMenuBackground, &CLSID_MenuBackground>,
	public IShellExtInit,
	public IContextMenu
{
public:
	CMenuBackground()
	{
	}
DECLARE_REGISTRY_RESOURCEID(IDR_MENUBACKGROUND)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CMenuBackground)
	COM_INTERFACE_ENTRY(IShellExtInit)
	COM_INTERFACE_ENTRY(IContextMenu)
END_COM_MAP()

// IShellExtInit
public:
	STDMETHOD(Initialize)(LPCITEMIDLIST pidlFolder,LPDATAOBJECT lpdobj,HKEY hkeyProgID);

// IContextMenu
public:
    STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
    STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici);
    STDMETHOD(GetCommandString)(UINT idCmd, UINT uType,UINT* pwReserved,LPSTR pszName,UINT cchMax);

protected:
    TCHAR m_szDirClickedIn [MAX_PATH];
public:
	CStringArray source;
};

#endif //__MENUBACKGROUND_H_

⌨️ 快捷键说明

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