Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:35 pm
by Jade Support >> Fri, 11 Jun 2004 4:17:47 GMT
Unfortunately you cannot access the printer device context directly from JADE logic, calling Windows APIs is the only way. (Note that the CMDPrint dialog returned DC is not the one JADE uses).
The following Windows APIs may be useful...
External Function Definitions:
createDC(
lpszDriver,
lpszDevice : String;
lpszOutput : Integer;
lpInitData : Binary) : Integer is CreateDCA in gdi32;
deleteDC(hdc : Integer) : Integer is DeleteDC in gdi32;
Example:
vars
hdc,
result : Integer;begin
hdc := call createDC('WINSPOOL', app.printer.getPrinterName(), 0, 0);
result := call deleteDC(hdc);
end;