Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

CRichEditCtrl::Cut

Delete (cuts) the current selection (if any) in the rich edit control and copies the deleted text to the Clipboard.

void Cut( );

Remarks

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

To delete the current selection without placing the deleted text into the Clipboard, call the Clear member function.

For more information, see WM_CUT in the Platform SDK.

Example

void snip_CRichEditCtrl_Cut()
{
   // The pointer to my rich edit control.
   extern CRichEditCtrl* pmyRichEditCtrl;

   // Delete all of the text and copy it to the clipboard.
   pmyRichEditCtrl->SetSel(0, -1);
   pmyRichEditCtrl->Cut();
}

See Also

CRichEditCtrl Overview | Class Members | Hierarchy Chart | CRichEditCtrl::Copy | CRichEditCtrl::Undo | CRichEditCtrl::Clear

Show:
© 2015 Microsoft