# EssGDestroyGrid

Description

EssGDestroyGrid() destroys a grid instance. The function will free any memory associated with the passed grid handle and make the handle invalid.

Syntax

    ESSG_FUNC_M EssGDestroyGrid (hGrid)

ESSG_HGRID_T | hGrid

Parameters

hGrid | Handle passed back from EssGNewGrid.

Return Value

If successful, returns ESSG_STS_NOERR.

Notes

- Destroys a grid instance.
- Frees any memory associated with the passed grid handle, and makes the handle invalid.

Access

None.

Example

    #include <essapin.h>
    #include <essgapin.h>

    ESSG_FUNC_M     sts = ESS_STS_NOERR;
    ESSG_INIT_T     InitStruct;
    ESSG_HANDLE_T   Handle;
    ESSG_HGRID_T    hGrid;

    InitStruct.ulVersion = ESSG_VERSION;
    InitStruct.ulMaxRows = 1000;
    InitStruct.ulMaxColumns = 200;
    InitStruct.pfnMessageFunc = ESS_NULL;
    InitStruct.pUserdata = ESS_NULL;

    /* initializes EGAPI */
    sts = EssGInit(&InitStruct, &Handle);

    /* initializes a specific grid */
    if(!sts)
       sts = EssGNewGrid(Handle, &hGrid);

    /* destroys a grid instance */
    if(!sts)
       sts = EssGDestroyGrid(hGrid);

See Also

Using the Grid API Functions
Grid API Structures
EssGNewGrid