Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
How do I printing RichText using the Common Dialog
I have a from with which I edit a RTF document. I have included the Common Dialog to retrieve the printer hDC. As in the code extract below:
ThisForm.CommonDialog1.Flags = cdlPDReturnDC + cdlPDNoPageNums
If ThisForm.oleRTF.SelLength = 0 Then
ThisForm.CommonDialog1.Flags = ThisForm.CommonDialog1.Flags +cdlPDAllPages
Else
ThisForm.CommonDialog1.Flags = ThisForm.CommonDialog1.Flags + cdlPDSelection
EndIf
ThisForm.CommonDialog1.ShowPrinter
ThisForm.oleRTF.SelPrint(ThisForm.CommonDialog1.hDC)
This code does not return a valid hDC and the printout is sent into the ether.
Help anyone.
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