Information générale
Catégorie:
Contrôles ActiveX en VFP
Titre:
How to print a richtext control's contents?
We're using a rtf control for WYSIWYG editing, and want to send the control's contents to the printer. The WINNT\Help\rtfbox98.chm help file says to use the object.SelPrint(hdc) method. The documentation includes the following remarks:
The SelPrint method does not print text from the RichTextBox control. Rather, it sends a copy of formatted text to a device which can print the text. For example, you can send the text to the Printer object using code as follows:
RichTextBox1.SelPrint(Printer.hDC)
Notice that the hDC property of the Printer object is used to specify the device context argument of the SelPrint method.
Note If you use the Printer object as the destination of the text from the RichTextBox control, you must first initialize the device context of the Printer object by printing something like a zero-length string.
MY PROBLEM
hdc is defined as the device context of the device you plan to use to print the contents of the control. My link to "device context" goes nowhere, so I must be missing some MSDN files, leaving me unsure as to how to get this fired up.
Anybody printing rtf controls in VFP6?
TIA
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement