FillTextBlockA

Blocks, Interaction

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to FillTextBlock and string arguments are interpreted using the current SetAnsiMode code page

Personalises a text block by fitting the given text into its rectangle with the current font selection

Syntax

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);

Parameters

Page, BlockIndexBlock selector
TextNon-empty replacement text
OptionsBit 1 deletes the block annotation after a successful fill

Return values

1 when the text was placed, 0 when the block is missing, not a text block, or the fit failed

Remarks

Block properties fontname (or font), fontsize (or size), fillcolor (or textcolor/color), alignment (or align/position) and fitmethod are applied automatically when present, and the caller font, text size, colour, alignment and selected page are restored before returning

See also

GetBlockCount, AddBlock, GetBlockType, GetBlockRect