FillTextBlockA

块、交互

描述

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

按当前字体选择把给定文字适配进文字块的矩形,完成个性化

语法

Delphi

Function DLFillTextBlockA(InstanceID, Page, BlockIndex: Integer; Text: PAnsiChar; Options: Integer): Integer;

DLL

int DLFillTextBlockA(int InstanceID, int Page, int BlockIndex, const char* Text, int Options);

参数

Page, BlockIndex块选择器
Text非空的替换文字
Options位 1:填充成功后删除块注释

返回值

文字放置成功返回 1;块不存在、不是文字块或适配失败时返回 0

备注

块属性 fontname(或 font)、fontsize(或 size)、fillcolor(或 textcolor/color)、alignment(或 align/position)与 fitmethod 在存在时自动生效;返回前会恢复调用方原有的字体、字号、颜色、对齐与所选页面

另请参阅

GetBlockCount, AddBlock, GetBlockType, GetBlockRect