CheckAddLabelByType
Check if a label of the given type already exists among headers. If yes, it will just return its position, If not, it will be added and its position will be returned.
int CheckAddLabelByType( UINT nType, int iPos = -1, BOOL bUndo = FALSE, BOOL bColheaders = true )
the index of the position of the added or the existing label, or -1 if error.
EX1
// The example shows the label "Comment" in the first row of labels (unless // the "Comment" row is already shown). void Worksheet_CheckAddLabelByType_Ex1() { Worksheet wks = Project.ActiveLayer(); if ( !wks ) { out_str("No active worksheet"); return; } UINT nType = RCLT_COMMENT; int nRet = wks.CheckAddLabelByType(nType); printf("nRet = %d\n", nRet); return; }
origin.h