This documentation is archived and is not being maintained.

CRichEditCtrl::Copy 

Copies the current selection (if any) in the rich edit control to the Clipboard.


void Copy( );

For more information, see WM_COPY in the Platform SDK.

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

   // Copy all of the text to the clipboard.
   pmyRichEditCtrl->SetSel(0, -1);
   pmyRichEditCtrl->Copy();
}
Show: