Page break in CRichEditView-how?
Peter Boulton -- Peter@dataper.demon.co.uk Saturday, December 14, 1996 Environment: VC++ 4.2 flat, Win 95 ================================== I have a CRichEditView, which I fill with formatted text programmatically. I would like to insert page breaks every so often, but can't figure out how to. Within an RTF file, which my CRichEditView saves to, I have established that the ascii text to force a pagebreak is "\page\". If I edit the saved file with a text editor and insert this, and load the file up in Word the page break is displayed. It isn't in the CRichEditView or in the CRichEditView print preview. Am I on a loser here? I really need to insert the page breaks as I'm generating the text rather than afterwards. Any ideas? Thanks (for reading this!) Pete -------------------------------------------------- Peter Boulton, Data Perceptions, Creator of the Prophecy Sales Forecasting System. http://www.dataper.demon.co.uk --------------------------------------------------
Dave Kolb -- sasdxk@wnt.sas.com Thursday, January 09, 1997 I've also wanted but have not been able to do this and am of the understanding that this as well as several other .rtf features are not supported by the RichEdit control. Perhaps the new NT4 RichEdit control (riched20.dll) will have some support though MFC does not yet support it and there is no doc that I know of yet either. Dave Kolb -----Original Message----- From: Peter Boulton [SMTP:Peter@dataper.demon.co.uk] Sent: Saturday, December 14, 1996 4:03 PM To: mfc-l@netcom.com Subject: Page break in CRichEditView-how? Environment: VC++ 4.2 flat, Win 95 ================================== I have a CRichEditView, which I fill with formatted text programmatically. I would like to insert page breaks every so often, but can't figure out how to. Within an RTF file, which my CRichEditView saves to, I have established that the ascii text to force a pagebreak is "\page\". If I edit the saved file with a text editor and insert this, and load the file up in Word the page break is displayed. It isn't in the CRichEditView or in the CRichEditView print preview. Am I on a loser here? I really need to insert the page breaks as I'm generating the text rather than afterwards. Any ideas? Thanks (for reading this!) Pete -------------------------------------------------- Peter Boulton, Data Perceptions, Creator of the Prophecy Sales Forecasting System. http://www.dataper.demon.co.uk --------------------------------------------------
ktm@ormec.com Saturday, January 11, 1997 On mfc-l, Dave Kolb wrote: > I've also wanted but have not been able to do this and am of the understanding > that this as well as several other .rtf features are not supported by the > RichEdit control. Right, a CRichEditCtrl only knows how to display a subset of RTF, although it can parse all of RTF. Page breaks and tables are some things it can parase but not display. Mike Blaszczak posted some information about this back at the end of July. You may want to check the archives. Here's an excerpt: On 7/30/96, in a message titled "RE: Printing RTF contents", Mike Blaszczak wrote: > The Rich Text Control provides the ability to _display and edit_ formatted > text. It's primary goal in life is _not_ to support every subtle nuance of > the rich text file format. The limitations of CRichEditCtrl aren't documented in VC++ Books Online. If you have MSDN, you can look in "Product Documentation; Languages; Visual Basic 4.0 Professional; Custom Control Reference; RichTextBox; Supported RTF Codes" for a list of codes that are supported by the rich edit control. Additionally, the RTF specification (version 1.4) is available at: ftp://ftp.microsoft.com/softlib/mslfiles/gc0165.exe http://www.microsoft.com/word/ProductInfo/ExpertTools/gc0165.exe This file also contains a sample RTF reader with source. Good luck, Katy -- Katy Mulvey ktm@ormec.com Software Development Engineer ORMEC Systems http://www.ormec.com
| Вернуться в корень Архива |