-
November 2nd, 2000, 07:40 AM
#1
RTF file generation
Hi,
Does anyone know a source code library (or commercial product) that I can call to create formatted RTF files from my application? I want to generate documents from my application, without learning all the details of the RTF tags.
Any suggestions most welcome!
/Magnus Unemyr
-
November 2nd, 2000, 07:51 AM
#2
Re: RTF file generation
it's in msdn
CRichEditCtrl::StreamOut
long StreamOut( int nFormat, EDITSTREAM& es );
Return Value
Number of characters written to the output stream.
Parameters
nFormat
Flags specifying the output data formats. See the Remarks section for more information.
es
EDITSTREAM structure specifying the output stream. See the Remarks section for more information.
Remarks
Call this function to write out the contents of this CRichEditCtrl object to the specified output stream.
The value of nFormat must be one of the following:
SF_TEXT Indicates writing text only.
SF_RTF Indicates writing text and formatting.
SF_RTFNOOBJS Indicates writing text and formatting, replacing OLE items with spaces.
SF_TEXTIZED Indicates writing text and formatting, with textual representations of OLE items.
snip
Assuming you have a rich edit control simply stream out with SF_RTF
-
November 2nd, 2000, 07:57 AM
#3
Re: RTF file generation
Hi,
Thanks for the suggestion, but this assumes the text is already available and formatted in the RichEditControl?
(=I need to add the RTF tags myself in order to get the formatted text into the RichEditControl in the first place?).
What I need is a library that created formatted RTF documents without me
knowing the RTF tags:
RTF_PrintfHeading1( "Some text" );
RTF_CreateTable( Columns, Rows );
....
/Magnus
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|