Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I am using TRichEdit::Print(AnsiString Caption) to print the contents of a Rich Edit control. Why does the caption not print at the top of any of the pages?

0
Posted

I am using TRichEdit::Print(AnsiString Caption) to print the contents of a Rich Edit control. Why does the caption not print at the top of any of the pages?

0

According to the help files, “The Caption parameter specifies the title that appears on the printed output.” This is incredibly misleading. The only printed output on which this string would appear is a network print job banner page. There is no code in TRichEdit::Print() to print headers or footers of any kind. The Caption string is actually assigned to the Title property of Printer (the global TPrinter object). This, in turn, is displayed in the Print Manager (or print spooler) and, as I mentioned, on network print job banner pages. You can, of course, print your own headers and footers. See the paper titled Printing and Previewing Rich Edit Controls available on this site.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.