Initial Release 5.0.7

Function : Item Conversion
ConvertItemToCompositeExt - Converts text item to composite item, allowing use of NLS_INFO structure.
----------------------------------------------------------------------------------------------------------

#include <ods.h>

STATUS LNPUBLIC ConvertItemToCompositeExt(
BLOCKID ItemValue,
DWORD ItemValueLength,
FONTID CompositeFont,
char far *LineDelimiter,
WORD ParaDelimiterFlags,
DHANDLE far *rethBuffer,
DWORD far *retBufferLength,
NLS_PINFO pInfo,
int CDFileFD,
BOOL fAppendToFile);

Description :

This function converts an item of TYPE_TEXT to an item of TYPE_COMPOSITE, allowing the use of the NLS_INFO structure. It takes as input a text item, its length, a font style, a line delimiter, and a paragraph marker. The function returns as output a HANDLE to the composite item and the length of the composite item.

This function is very useful in Import/Export Dynamic Link Libraries (DLLs) and E-Mail Gateways where plain text or data with imbedded control characters must be converted to Rich Text.

Note: Your program is responsible for freeing any memory associated with a valid handle returned in argument 6.

Parameters :

Sample Usage :

/* Convert the Text to CD and copy ret'd Block to temp CD file   */

usError = ConvertItemToCompositeExt(
              ImpTextBID,   /* BLOCKID of TEXT ITEM just fabricated*/
              dwTextLen,                    /* Length of TEXT ITEM */
              EditorData->FontID, /* Use FontID provided by Editor */
              szEOL,             /* using "\r\n" as line delimiter */
              ParaDelimiters, /* using ANYBLANKLINE para delimiter */
              &hCDBuf,            /* ret'd handle to CD buffer     */
              &dwCDItemLen,         /* ret'd len of composite item */
              NULL,            
              0,                                 /* Reserved */
              FALSE);                            /* Reserved */

if (usError)

See Also :

EnumCompositeBuffer
----------------------------------------------------------------------------------------------------------