Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get HDC of Image
Message
 
To
02/09/1999 06:33:33
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00260509
Message ID:
00260540
Views:
10
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform