Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help! Please
Message
From
07/02/2000 12:15:34
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Help! Please
Miscellaneous
Thread ID:
00328323
Message ID:
00328323
Views:
52
I cannot seem to format the ESCAPE function correctly. I am trying to send reverse line feeds to dot matrix printers. Can this be done using the ESCAPE function. If so please tell me how to format the funtion. Thanks. My code is as follows:

DECLARE INTEGER CreateDC IN GDI32 ;
STRING thedriver , ;
STRING theprinter , ;
INTEGER lpszoutput , ;
INTEGER @lpinitdata


*!* this clears the printer dc out of memory
*!* format for this function is =DeleteDC(hdc)
DECLARE INTEGER DeleteDC IN GDI32 ;
INTEGER THEDC


*!* this should allow me to send printer control codes to the printer , am still working on the syntax for this command
DECLARE INTEGER Escape IN GDI32 ;
INTEGER hdc , ;
INTEGER theescape , ;
INTEGER nCOUNT , ;
STRING lspdata , ;
INTEGER oUTDATA ,

LOCAL RESULT,PHANDLE,ESC_CODE,hdc
RESULT=0
PHANDLE=0
myprint=GETPRINTER()
result=OpenPrinter(myprint,@pHANDLE,0)
hdc=CreateDC(0,myprint,0,0)
thecode='chr(27)+CHR(93)' && I think this is the problem
result=Escape(hdc,19,0,@THECODE,0)
=GetError() && i have additional declarations for this etc
* The error is 'parameter is incorrect'
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Reply
Map
View

Click here to load this message in the networking platform