Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Redirecting printer output to different device (hDC)
Message
From
10/05/2005 14:32:23
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Redirecting printer output to different device (hDC)
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01012539
Message ID:
01012539
Views:
65
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
Next
Reply
Map
View

Click here to load this message in the networking platform