Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I printing RichText using the Common Dialog
Message
De
01/05/1997 12:10:49
 
 
À
01/05/1997 09:02:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00030436
Message ID:
00030466
Vues:
51
Try this code...

DECLARE LONG CreateDC IN GDI32 ;
STRING, STRING, STRING, CHAR
DECLARE LONG DeleteDC IN GDI LONG

lnhDC = CreateDC("", SET("PRINTER",2),.NULL.)
Thisform.oleRTF.SelPrint(lnhDC)
=DeleteDC(lnhDC)

You will have to encorporate the GETPRINTER() function (or Common Dialog) into this but this example shows you how to get a printer hDC.

GeneS



>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform