Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Redirecting printer output to different device (hDC)
Message
 
À
10/05/2005 14:32:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01012539
Message ID:
01012669
Vues:
27
>Hello,
>
>i'm currently playing around with the new Reportlistener class.
>
>What i tried to do is, as the topic already states, to redirect the output to another devicecontext (hDC handle from GDI)
>
>i've tried all available ListenerType's but can't get it to work ..
>
>pseudocode:
>
>
>...some API code to get me a custom hDC from my printer ...
>
>loListener = CREATEOBJECT('oPrintTest',myHDC)
>REPORT FORM someReport NEXT 3 OBJECT loListener
>
>
>DEFINE CLASS oPrintTest AS ReportListener
>
>	ListenerType = 0
>	hDC = 0
>
>	PROCEDURE Init(lnhDC)
>		THIS.hDC = lnhDC
>	ENDPROC
>	
>	PROCEDURE OutputPage(nPageNo, eDevice, nDeviceType ,nleft, nTop, nWidth, nHeight, ;
>						nClipLeft,nClipTop, nClipWidth, nClipHeight)
>			DODEFAULT(nPageNo,THIS.hDC,0,nLeft,nTop,nWidth,nHeight,nClipLeft,nClipTop,nClipWidth,nClipHeight)
>    ENDPROC	
>
>ENDDEFINE
>
>
>all always get an error in OutputPage:
>Function argument value, type, or count is invalid (Error 11)
>
>from the help I initally thought that it would be rather easy to do it since it states:
>"In page-at-a-time mode (ListenerType values 0 and 2), ReportListener uses this parameter to send you the current page number as it prepares each page for output. !! You can request that this single page be rendered to an alternate device at this point. !! "
>
>Regards

Christian,

What's the value comne back from the API call? You had to get the device context handle from somewhere.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform