使用 Erik Van Bilsen (GitHub) 中的工具创建功能区样式菜单,并仔细按照说明将简单功能区菜单合并到 Delphi 10.1 中的新 VCL 表单应用程序中,我在运行我的时遇到了 OLE 异常(未指定)应用程序。错误发生在下面指示的行:
procedure TUIRibbon.Load();
Ribbon resource "%s": %s';
var
Inst: THandle;
lForm: TCustomForm;
begin
if (Available) and (inherited Visible) and not (FLoaded) then
begin
// Load mapper for mapping between commands and VCL actions
fRibbonMapper := TRibbonMarkupElementList.LookupListByResourceName(FResourceName);
if (FResourceInstance = 0) then
Inst := HInstance
else
Inst := FResourceInstance;
try
// OLE Exception. Unspecified error happens here:
FFramework.LoadUI(Inst, PChar(FResourceName + '_RIBBON')); //Note: FResourceName = 'APPLICATION' here.
FLoaded := True;
if Assigned(FOnLoaded) then
FOnLoaded(Self);
if roAutoPreserveState in Options then
有什么建议么?