我是通过写注册表的方式在菜单中增加了一项,现在我想给自己添加的菜单定制热键,不知道该怎么做
我添加菜单的代码如下:
CLSID_DelphiBand: TGUID = '{3F5A62E2-51F2-11D3-A075-CC7364CAE42B}';
S := GUIDToString(CLSID_DelphiBand);
with TRegistry.Create do
try
DeleteKey('Software\Microsoft\Windows\CurrentVersion\Explorer\Discardable\PostSetup\Component Categories\'
+ VerticalBand + '\Enum');
RootKey := HKEY_CLASSES_ROOT;
if OpenKey('CLSID\' + S, True) then
begin
WriteString('', '发票发售管理 &ctrl+shift+F');
CloseKey;
end;
if OpenKey('CLSID\' + S + '\InProcServer32', True) then
begin
WriteString('ThreadingModel', 'Apartment');
CloseKey;
end;
if OpenKey('CLSID\' + S + '\Implemented Categories\' + VerticalBand, True)
then
CloseKey;
finally
Free;
end;