>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