Layer::Delete

Description

delete one layer

Syntax

BOOL Delete( DWORD dwCntrl = OCD_UNDO )

Parameters

dwCntrl
[input] general options for object creation and deletion flags. See OCD_ in oc_const.h

Return

TRUE for success else FALSE

Examples

EX1

//Delete one layer in the active graph page.
void Layer_Delete_ex1()
{
    GraphLayer gl = Project.ActiveLayer();
    if(gl)
    {
        GraphPage gp = gl.GetPage();
        int nn = gp.AddLayer();
        GraphLayer glNew = gp.Layers(nn);
        if(glNew)
        {
            int nLayers = gp.Layers.Count();
            gl.Delete();
            if(gp.Layers.Count() == nLayers - 1)
                printf("delete layer successfully\n");
        }
    }    
}

Remark

See Also

header to Include

origin.h