>>How can the Windows handle of an ActiveX control on a form be obtained? The particular ActiveX that I am using does not have this property available. Is there a way to retrieve it? Thanks.
>>
>See if
http://news2news.com/vfp/?example=261&function=136 can help.
Sergey--
Thank you for the above link; this led me to the missing information that I needed. I found the Win32 API call:
FindWindowEx
that would get the handle for the active-x as a child on a form; but I needed to know the active-x class name for the function to work. The above referenced link gave me that information. I was trying the class name that is displayed for the OLE class in VFP, but this was not giving the handle (always returned 0). With a test form (with the active-x placed on it) and the above referenced code, I was able to determine the actual active-x class name. Now with the following code, the Active-x handle can be determined:
LOCAL lcOLEClass, lhAXHdl
DECLARE INTEGER FindWindowEx IN "user32.dll" ;
INTEGER, INTEGER, STRING @, STRING @
lcOLEClass = "AfxOleControl80"
lhAXHdl = FindWindowEx(thisform.HWnd,0,@lcOLEClass,0)
...
Thanks again for your help.