Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CreateCompatibleBitMap and Win2000
Message
 
À
19/12/2001 14:21:53
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00596108
Message ID:
00596381
Vues:
35
>George,
>The printer resolution is set to max. The problem is that the function insists on trying to print the screen background colors. This turns the output created on a DotMatrix printer into a gray haze. According to the documentation of "CreateCompatibleBitmap" it should strip out this element of the bitmap if the device is not capable of printing in color - at least that is my understanding of the documention. All I can say is that the same proc works on Win98 machines and does not work on Win2000/XP machines and my *** is apparently in a sling because I just sent this out to 500 customers.

Calvin,

First, I understand and sympathize, however, it doesn't change my orginal statement that I don't think the problem is CreateCompatibleBitmap(). My suspicion here is that the call to CreateDC() is the problem. If we could see a code snippet of the call to that, especially including the initialization of the DEVMODE structure, it might help solve the problem.

Now the reason I say this is that CreateCompatibleBitmap() creates the bitmap in correspondence to the characteristics of the device context that's passed to it. If CreateDC() isn't sent the proper information, it will not create an appropriate device context. If CreateDC() isn't used or fails, and CreateCompatibleDC() is called with a null (which CreateDC() would return in case of failure), CreateCompatibleDC() returns a device context which is compatible with the application's current screen. This would explain why you're getting color when CreateCompatibleBitmap creates the output.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform