📄 contextmenu.h
字号:
#pragma once
class CContextMenu
{
public:
CContextMenu(LPCTSTR lpszDisplayNameForFile ,LPCTSTR lpszDisplayNameForFolder ,LPCTSTR lpszExtName,LPCTSTR lpszAppFullPath="");
~CContextMenu(void);
private:
CString m_strDisplayNameForFile; //为在文件菜单中显示的名称
CString m_strDisplayNameForFolder; //为在文件夹菜单中显示的名称
CString m_strExtName;
CString m_strAppFullPath;
HKEY m_hRootKey;
private:
CString GetImgType(LPCTSTR lpszExtName);
// 往注册表里添加
void AddRegKey(HKEY hKey , LPCSTR lpSubKey,CString strDisplayName);
public:
void AddContextMenuForFile(void);
void DelContextMenuForFile(void);
void AddContextMenuForFile(LPCTSTR lpszExtName);
void DelContextMenuForFile(LPCTSTR lpszExtName);
BOOL IsNullForFile(void);
// 为文件夹添加菜单项
void AddContextMenuForFolder(void);
// 删除文件夹菜单项
void DelContextMenuForFolder(void);
// 文件夹菜单项是否为空
BOOL IsNullForFolder(void);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -