>Hi Klas,
>
>As Ed mentioned, passing an integer zero should work with FindWindow, since it represents a null pointer. FindWindow() intreprets that as a null string since both parameters are passed by reference.
Hi again,
I used the following code in FoxPro to get a hold of the classname of the main window, and it works fine, but nothing works from Word!!!
DECLARE INTEGER FindWindow IN Win32API ;
STRING lpszClassname, STRING lpszWindowName
DECLARE INTEGER GetClassName IN Win32API ;
INTEGER hWnd, STRING lpszClassName, INTEGER nMaxCount
lnHandle = FindWindow(0,_SCREEN.Caption)
lcClass = REPLICATE(CHR(0),200)
lnTemp = GetClassName(lnHandle, @lcClass, 200)
(using VFP 3.0 for Win & Mac)