Layer::SetPosition

Description

Set Layer area [and units]

Syntax

BOOL SetPosition( const double * pVals, int nUnits = -1, DWORD dwCtrl = OCD_ASK )

Parameters

pVals
[input] 4 values that are the width, height, left and top of the layer area
nUnits
[input] one of M_PERCENT, M_INCH, .. M_LINK, or -1 to use current units
dwCtrl

Return

return true for success

Examples

EX1

//Set the active graph layer's position.
void Layer_SetPosition_ex1(double left, double top)
{
    double xx[4], yy[4];
    GraphLayer gl = Project.ActiveLayer();
    int nCurrent = gl.GetPosition(yy);
    yy[2] = left;
    yy[3] = top;
    gl.SetPosition(yy);
}

Remark

See Also

Layer::GetPosition, Layer::UnitsConvert

header to Include

origin.h