SRGraphLabelBlock::RemoveLastLabel
void SRGraphLabelBlock::RemoveLastLabel(void)
Deletes the last label from the list
Defined in: SRGraphLabelBlock.cpp
Example
Tail end removal can be accomplished like so...
CString strLabelText;
SRGraphLabelBlock *Labels=GetMyBlockPointer();
for (int x=0;x<7;x++)
{ // Add a few labels
strLabelText.Format(_T("%d"),x);
Labels->AddLabelIndex(strLabelText,x);
}
// not remove a few
while(Labels.GetLabelCount()>5);
Labels->RemoveLastLabel();
Remarks
Used primarily to tidy label blocks. Label blocks are maintained between draw cycles to
minimize allocation time overheads. These blocks are updated and accessed using the
AddLabelIndex function. If the label block size increases, then
labels are automatically added. If the block size decreases. then the unwanted labels can
be flushed from the end of the list using this function.