Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check if VFP is running from Word ??
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00160586
Message ID:
00160867
Views:
15
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform