Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using the Selprint Method of a RichText Control
Message
De
16/09/1999 11:49:10
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
19/03/1999 17:07:21
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00199808
Message ID:
00265501
Vues:
16
>>I am sure this has been answered before but I missed it.
>>
>>I need to use the selprint function of a RichText Control.
>>Unfortunately it requires the following
>>
>>hdc -- Thedevice context of the device you plan to use to print the
>>contents of the control.
>>
>>and
>>
>>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.
>>
>>Assuming I have the name of the printer or I just want to print to the
>>default printer.

>
declare integer CreateDC in Win32API ;
>    string @ lpszDriver,	;
>    string @ lpszDevice,	;
>    string @ lpszOutput,	;
>    string @ lpInitData
>declare integer DeleteDC in Win32API ;
>    integer hDc
>declare integer GetDeviceCaps in Win32API ;
>    integer  hdc, integer  nIndex
>
>#define DRIVERVERSION 0
>#define TECHNOLOGY    2
>
>lpszDriver="WINSPOOL"
>lpszDevice=getprinter()
>hDC = CreateDC(lpszDriver, lpszDevice, 0, 0)
>? hDc                        && If succesfull not NULL
>? GetDeviceCaps(hDC, DRIVERVERSION)
>? GetDeviceCaps(hDC, TECHNOLOGY) && 2 Rasterprinter 0 Vectorplotter
>=DeleteDC(hDC)
This works and gets hDC but still I can't use selprint. MS KB says you cannot print under Win95 but WinNT and under investigation. June 18, 1997 Article ID: Q170126 (I don't have newer). Feedback me if you succeed :)
>Cetin

I'm sort of late-jumping into this thread, but now I need it, so I'd like to know if anything worked, short of running a dummy instance of CommonDialogs (while that would still work OK for me if it wouldn't show onscreen).

So, did anyone get this working?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform