Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get HDC of Image
Message
 
À
02/09/1999 06:33:33
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00260509
Message ID:
00260540
Vues:
11
>Vb equivalent command is :-
>
>hTmpDc=CreateCompatibleDC(Picture1.hdc)
>
>same way i've added a image control but there is no hdc avl for that in vfp..
>
>I've also chkd Obj2Bmp but its very complicated & was not able to understand it properly...
>
>Pls note that in my project, this form will remain always same, imagecontrol will also remain... only thing is image will be changed and i want to get hdc everytime...
>
>Pls help..

Hi Vinod,

It might help if I knew exactly what you were trying to do.

Anyway, what Obj2Bmp does is to first get the device context for the window with GetWindowDC() (passing the window handle), it then calls CreateCompatibleDC() with the value it gets from GetWindowDC() to create the compatible device context. Of course, there's a lot more to it than this. The bottom line is to first get the window handle (using the foxtools functions _WFindTitl() and _WhTohWnd()), pass that to GetWindowDC(), then pass that device context to CreateCompatibleDC().

Does this help?
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