>Is anybody know,...
>
>How to retrieve hdc (Handle of Device context) of a Form or Control object,.. ?
>
>Because when I was using VB hdc is part of a form or control object properties,...
>
>Any suggestion,..??
Hi Mesa,
While VFP's native controls aren't real windows and don't have window handle, the forms are. You can get the window handle of a VFP form by using the Foxtools library like this:
lnhWnd = _WhTohWnd(_WFindTitl(_SCREEN.ActiveForm.Caption))
lnhWnd = _WhTohWnd(_WOnTop())
Once you have the window handle you can get the device context using the Win32 call GetWindowDC
DECLARE INTEGER GetWindowDC IN Win32API;
INTEGER hwnd
lnhDC = GetWindowDC(lnhWnd)
hth,
George
Ubi caritas et amor, deus ibi est