The EndTask function is called to forcibly close a specified window.
API syntax : BOOL EndTask( HWND hWnd, BOOL fShutDown, BOOL 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.
If the function fails, the return value is FALSE.
Extern.Declare micInteger, "EndTask", "user32.dll", "EndTask", micHWnd, micInteger, micInteger
Browser("B").Close
Wait 5
If Browser("B").Exist( 0 ) Then
hwnd = Browser("B").GetROProperty( "hwnd" )
bRetval = Extern.EndTask( hWnd, False, True )
End If
Posted in Windowing

daniva




Recent Comments