Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to print a richtext control's contents?
Message
De
09/09/2000 11:28:33
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
How to print a richtext control's contents?
Divers
Thread ID:
00414589
Message ID:
00414589
Vues:
71
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
Fil
Voir

Click here to load this message in the networking platform