CRichEditCtrl::Clear

void Clear( );

Remarks

Call this function to delete (clear) the current selection (if any) in the rich edit control.

The deletion performed by Clear can be undone by calling the Undo member function.

To delete the current selection and place the deleted contents onto the Clipboard, call the Cut member function.

For more information, see WM_CLEAR in the Win32 documentation.

Example

// The pointer to my rich edit control.
extern CRichEditCtrl* pmyRichEditCtrl;

// Delete all of the text.
pmyRichEditCtrl->SetSel(0, -1);
pmyRichEditCtrl->Clear();

CRichEditCtrl OverviewClass MembersHierarchy Chart

See Also   CRichEditCtrl::Undo, CRichEditCtrl::Cut, CRichEditCtrl::Copy, CRichEditCtrl::Paste