Column::GetLastDependentColumnOffset

Description

Get the index of the column in the same worksheet that is farthest away from this column and that is dependent on this column.

Syntax

int GetLastDependentColumnOffset( DWORD dwCntrl )

Parameters

dwCntrl
[input] is a combination of the following cotrol bits:
typedef enum
{
DOO_LEFT = 0x10000000, // left offset
DOO_ERRORBAR = 0x00010000, // errorbars
DOO_MODIFIER = 0x00020000, // modifiers
DOO_TYPE_MASK = 0x000F0000, // type mask
} DEPENDENTOBJOFFSET;

Return

Returns last dependent column offset if success, -1 if error.

Examples

EX1

void    Column_GetLastDependentColumnOffset_Ex1()
{
    Worksheet wks = Project.ActiveLayer();
    Column colObj(wks, 0);
    int nOffset = colObj.GetLastDependentColumnOffset(DOO_ERRORBAR);
    printf("Column %u\n", nOffset + 1);
}

Remark

Get the index of the column in the same worksheet that is farthest away from this column and that is dependent on this column.


Regarding modifiers: The index returned should be such that, if a column were to be inserted at that location in the worksheet, the distance between any column from the same worksheet that is plotted in some graph and any of its modifier columns used in conjunction with the same dataplot in that graph should not change. This could be rephrased like this: if a column plotted in some graph and all its modifiers associated with the same dataplot are considered as one range, then the index returned

1) should not break any such range in the worksheet

2) it should be to the right of the range containing the column through which the method call is made.

See Also

header to Include

origin.h