Syntax:
INT LlRTFGetText(HLLJOB hJob, HLLRTFOBJ hRTF, INT nFlags, LPTSTR lpszBuffer, UINT nBufferSize);
Task:
Returns the text of an RTF object
Parameter:
hJob: List & Label job handle
hRTF: RTF object handle
nFlags: Options (see LlRTFGetTextLength())
lpszBuffer: Address of buffer for the text
nBufferSize: Maximum number of characters to be copied
Return Value:
Error code
Hints:
See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value.
Example:
HLLRTFOBJ hRTF = LlRTFCreateObject(hJob);
if
(LlRTFEditObject(hJob, hRTF, NULL, NULL, LL_PROJECT_LABEL) >= 0)
{
INT nFlags =
LL_RTFTEXTMODE_RTF|LL_RTFTEXTMODE_EVALUATED);
INT nLen =
LlRTFGetTextLength(hJob,hRTF,nFlags);
TCHAR* pszText = new
TCHAR[nLen+1];
LlRTFGetText(hJob, hRTF, nFlags, pszText,
nLen+1);
printf("'%s'\n\n", pszText);
delete[]
pszText;
}
See also:
LlRTFCreateObject, LlRTFGetTextLength