BCGControlBar Pro for MFC
BOOL CBCGPEditCtrl::DeleteText ( int  nStartOffset,
int  nEndOffset,
BOOL  bRedraw = FALSE,
BOOL  bForceNextUndo = FALSE 
)

Deletes a block of text from the edit control.

Returns
Nonzero if the text was deleted successfully; otherwise FALSE.

This member function deletes a block of text from the edit control. The block is defined by nStartOffset and nEndOffset values.

The deleted text is stored in the undo buffer and the caret is set to nStartOffset offset from the beginning of the text.

Parameters
nStartOffsetSpecifies the start offset of the text to be deleted.
nEndOffsetSpecifies the end offset of the text to be deleted.
bRedrawSpecifies whether the edit control should be redrawn after delete.
bForceNextUndoSpecifies whether the undo action, created as a result of deletion, should be used as a complex undo action in sequence.