Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DocumentProperties anyone?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01010251
Message ID:
01011434
Vues:
22
>GetPrinter is supported on Win9X/ME as long as you use 1, 2 or 5 for Printer Info level
>
>Actually, in MSKB link you had posted is lead to another example and more complete:
>How To Modify Printer Settings by Using SetPrinter
>http://support.microsoft.com/kb/140285/EN-US/

I've gotten back into this, but I'm still having problems. For one thing, it seems that the third parameter of SetPrinter is where you'd send the modified Devmode settings, but it must be a pointer to the Devmode structure. I've tried sending it by reference, but I get a "Data type mismatch" error. I've googled this message, and I can only find a message from someone saying that it appears that VFP doesn't like it when you try to use SetPrinter.

So now I'm back to trying to add SendMessage to my code, but I'm not sure of what to send for the second parameter. Here's how to declare it in VFP, as shown in www.news2news.com:
DECLARE INTEGER SendMessage IN user32; 
    INTEGER hWnd,; 
    INTEGER Msg,; 
    INTEGER wParam,; 
    INTEGER lParam 
Note that the second parameter is the message to send, but it's an integer! In fact, all the parameters are integers. The example on http://www.amyuni.com/downloads/tn02.htm indicates that the changed Devmode is what you'd send in this second parameter, but it looks like the same problem I have with SetPrinter().
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform