BCGSoft Professional Editor for MFC
virtual BOOL CBCGPEditCtrl::OnRemoveMarker ( CBCGPEditMarker pMarker,
POSITION  posMarker 
)
inlinevirtual

Called by the framework when a marker is about to be removed.

Returns
Should return FALSE to prevent a marker from deletion.

You should override this function in a derived class if you want to prevent some markers from removing.

Markers are removed either as a result of a direct call to DeleteMarker(POSITION posMarker) / CleanUpMarkers() or as a result of removing of lines with markers. In the first case you can't prevent deletion of markers. In the second case you can by returning FALSE.

For example, if you want to define a color area at some line in the document and do not want this area removed (you want to highlight a header), you should override OnRemoveMarker(), check pMarker->m_dwMarkerType and pMarker->m_nLine, and return FALSE if this marker has to be kept.

The default implementation returns TRUE.

Parameters
pMarkerPoints to the marker to be removed.
posMarkerPosition of the marker in the internal marker list.