Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DestroyWindow() API question
Message
From
22/10/2003 16:57:34
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
DestroyWindow() API question
Miscellaneous
Thread ID:
00841295
Message ID:
00841295
Views:
60
Hi all,

In the Remarks of the User32.DestroyWindow() API, it states:
*"A thread cannot use DestroyWindow to destroy a window created by a different thread."
Does this mean that a VFP application cannot destroy the window created by another VFP application? An example of my implementation using the Calculator as the test window. Code snippet as follows:
* note: open the Calculator accessory
declare integer FindWindow in win32api string @lpClassName, string @lpWindowName
declare integer DestroyWindow in user32 integer hwnd

local hWnd_
hWnd_ = FindWindow(0,"Calculator")
if hWnd_ > 0
	wait window transform(hWnd_)
	wait window transform(DestroyWindow(hWnd_)) && does not close the calculator!
endif
TIA.
ramil
~~ learning to stand still
Next
Reply
Map
View

Click here to load this message in the networking platform