SetFormFieldActionA

表单字段、注释和热点链接

说明

末尾的 A 表示 ANSI(char)DLL 入口点;ActiveX/COM 接口仅公开 Unicode 形式。其行为与 SetFormFieldAction 相同,字符串参数使用当前 SetAnsiMode 代码页解释

将现有操作字典绑定到表单字段触发器

语法

Delphi

Function DLSetFormFieldActionA(InstanceID, Index: Integer; ActionType: PAnsiChar; ActionID: Integer): Integer;

DLL

int DLSetFormFieldActionA(int InstanceID, int Index, const char * ActionType, int ActionID);

参数

Index从 1 开始的表单字段索引
ActionType触发器名称:E、X、D、U、Fo、Bl、K、F、V 或 C
ActionID由 GetAnnotActionID、GetOutlineActionID 或 GetFormFieldActionID 返回的操作句柄

返回值

0字段、触发器或操作句柄无效
1该操作已复制并分配给字段触发器

备注

操作字典会在分配给字段前复制到选定文档中,因此随后对原始操作的编辑不会改变字段触发器

对主鼠标松开激活操作使用 ActionType U,与 GetFormFieldActionID(Index, 'U') 读取的操作相匹配

使用 RemoveFormFieldAction 清除触发器,并使用 GetFormFieldActionInfo 通过 TPDFlibActionInfo 检查已分配的动作