Important: The information in this document is obsolete and should not be used for new development.
TEStyleNew
TheTEStyleNewfunction creates a multistyled edit record and allocates a handle to it.
FUNCTION TEStyleNew (destRect: Rect; viewRect: Rect): TEHandle;
destRect- The destination rectangle for the new edit record, specified in the local coordinates of the current graphics port. This is the area in which text is laid out.
viewRect- The view rectangle for the new edit record, specified in the local coordinates of the current graphics port. This is the area of the window in which text is actually displayed.
DESCRIPTION
Always use theTEStyleNewfunction to create an edit record for text that uses varying character attributes. TheTEStyleNewfunction sets thetxSize,lineHeight, andfontAscentfields of the edit record to -1, allocates a style record, and stores a handle to the style record in thetxFontandtxFacefields. TheTEStyleNewfunction creates and initializes a null scrap that is used by TextEdit routines throughout the life of the edit record.Call
TEStyleNewonce for every edit record you want allocated. Your application needs to store the handle to the edit record that is returned; many routines require it as an input parameter.If your application contains more than one window where text editing occurs, you need to create an edit record for each window.