Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Winspool.drv DocumentProperties
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00968160
Message ID:
00969620
Vues:
38
I tried my coding below which does not work. I am not sure what's it's problem. It does not display the printer properties even though I passed the parameter DM_IN_PROMPT.



#DEFINE PRINTER_ACCESS_ADMINISTER 4
#DEFINE PRINTER_ACCESS_USE 8

#DEFINE DM_IN_BUFFER 8
#DEFINE DM_IN_PROMPT 4
#DEFINE DM_OUT_BUFFER 2


DECLARE INTEGER OpenPrinter IN winspool.drv;
STRING pPrinterName, INTEGER @phPrinter, STRING pDefault

DECLARE INTEGER ClosePrinter IN winspool.drv INTEGER hPrinter

DECLARE INTEGER DocumentProperties IN winspool.drv;
INTEGER hWnd,;
INTEGER hPrinter,;
STRING pDeviceName,;
STRING @ pDevModeOutput,;
STRING @ pDevModeInput,;
INTEGER fMode


lcDefaultPrinter = set("printer", 2)
lnPrinterHandle = 0
lcPrnDefaults = Repli(Chr(0),8) + Chr(PRINTER_ACCESS_ADMINISTER) + Repli(Chr(0),3)

if OpenPrinter(lcDefaultPrinter, @lnPrinterHandle, lcPrnDefaults) = 0
? "Error opening printer [" + lcDefaultPrinter + "]"
return
endif

lcDevOutput = space(270)
lcDevInput = null

? lcDefaultPrinter
? DocumentProperties(_screen.HWnd, lnPrinterHandle, lcDefaultPrinter, ;
@lcDevOutput, @lcDevInput, DM_IN_PROMPT)

=ClosePrinter(lnPrinterHandle)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform