BCGSoft Professional Editor for MFC
virtual BOOL CBCGPEditCtrl::InsertNewLine ( BOOL  bRedraw = FALSE,
BOOL  bForceNextUndo = FALSE,
int  nOffset = -1,
BOOL  bSetCaret = TRUE 
)
virtual

Inserts a new line into the edit control.

Returns
Nonzero if the function succeeds; otherwise 0.

This function inserts a new line into the edit control and scrolls the text if necessary. If m_bDefaultIndent is TRUE the caret is placed under beginning of the text in the previous line (in the same column), otherwise the caret is placed at the first column.

Parameters
bRedrawSpecifies whether the edit control should be redrawn (TRUE) or not (FALSE).
bForceNextUndoIf TRUE, the undo action added as a result of this operation will be a part of undo sequence.
nOffsetThe offset at which the new line is inserted.
bSetCaretSpecifies whether to set the caret to the next line or not.