CMarkup GetParentElemIndex Method
int CMarkup::GetParentElemIndex() const;
GetParentElemIndex returns the current parent position element's internal index. See ElemIndex Navigation for the full story on all the ElemIndex methods.
When there is no current main position, such as after ResetMainPos, the only anchor for the current position in the document is the current parent position.
The ElemIndex functions provide access to the internal element indexing of CMarkup. Do not attempt to goto an index of an element that may have been deleted. Also, indexes are only valid during the course of the CMarkup object's lifespan unless it is re-initialized (with SetDoc or Load). As elements are added and removed to a CMarkup object, an existing element's index remains valid unless it is removed or replaced.