Using Win32 functions in Visual FoxPro Image Gallery
Window
..msdn
BringWindowToTop
CloseWindow
CreateWindow
CreateWindowEx
DestroyWindow
EndTask
FindWindow
FindWindowEx
GetAncestor
GetClientRect
GetDesktopWindow
GetForegroundWindow
GetGUIThreadInfo
GetParent
GetShellWindow
GetWindow
GetWindowInfo
GetWindowPlacement
GetWindowRect
GetWindowText
GetWindowTextLength
GetWindowThreadProcessId
InternalGetWindowText
IsChild
IsIconic
IsWindow
IsWindowVisible
IsZoomed
MoveWindow
RealGetWindowClass
SetForegroundWindow
SetLayeredWindowAttributes
SetParent
SetWindowPos
SetWindowText
ShowWindow
SwitchToThisWindow
Code examples:
EndTask
..msdn    Add comment     W32 Constants      Translate this page
The EndTask function is called to forcibly close a specified window.
Code examples:
Declaration:
BOOL EndTask(
    HWND hWnd,
    BOOL fShutDown,
    BOOL fForce
);
FoxPro declaration:
DECLARE INTEGER EndTask IN user32;
    INTEGER hWindow,;
    INTEGER fShutDown,;
    INTEGER fForce

Parameters:
hWnd
[in] Handle to the window to be closed.

fShutDown
[in] Ignored. Must be FALSE.

fForce
[in] A TRUE for this parameter will force the destruction of the window if an initial attempt fails to gently close the window using WM_CLOSE. With a FALSE for this parameter, only the close with WM_CLOSE is attempted.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
Upon receiving WM_CLOSE, by default, the DefWindowProc function calls the DestroyWindow function to destroy the window.

The following code is most likely invoked when the EndTask called with fForce=False :

#DEFINE WM_CLOSE 0x0010
DECLARE INTEGER GetActiveWindow IN user32
DECLARE INTEGER PostMessage IN user32;
        INTEGER hWindow, INTEGER Msg,;
        INTEGER wParam, INTEGER lParam

= PostMessage(GetActiveWindow(), WM_CLOSE, 0,0)

See also: IsWindow.
Word Index links for the EndTask :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2005-08-31 16:08:14
Modified: 2005-08-31 16:23:29
Visited in last 7 days: 11
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.81.237.159)
8 sec.Articles
15 sec.
Function group: 'GDI+ Bitmap'
25 sec.Function: 'FindResource'
34 sec.Function: 'GdipCreateMatrix2'
43 sec.Function: 'capCreateCaptureWindow'
52 sec.Function: 'GetDeviceDriverBaseName'
1.03 min.Function: 'GdipShearMatrix'
1.18 min.Function: 'CoTaskMemFree'
1.35 min.Function: 'GetFullPathName'
1.55 min.Function: 'EnumProcesses'
Google
Advertise here!