_EdCloseFile( ) API Library Routine

See Also   Example

Closes both the specified editing window and the file displaying in the window.

Syntax

int _EdCloseFile(WHANDLE wh, int option)
WHANDLE wh;            /* Handle of editing window. */
int option;                  /* Closing options. */

Remarks

The option parameter can be one of the following:

Option parameter values

int result
0 Immediately save.
1 Save after dialog box confirmation.
2 Open Save As dialog box.

_EdCloseFile( ) returns one of the following:

_EdCloseFile( ) return values

int meaning
1 Cancel without saving file.
0 Save and close file.
– 1 Discard changes and close file.

For more information on how to create an API library and integrate it with Visual FoxPro, see Chapter 28, Accessing the Visual FoxPro API, in the Programmer's Guide.