WM_COPY

2.x

WM_COPY
wParam = 0;     /* not used, must be zero */
lParam = 0L;    /* not used, must be zero */

An application sends a WM_COPY message to an edit control or combo box to copy the current selection to the clipboard in CF_TEXT format.

Parameters

This message has no parameters.

Return Value

The return value is nonzero if this message is sent to an edit control or a combo box.

Example

This example sends an EM_SETSEL message to select the entire contents of an edit control. It then sends a WM_COPY message to copy the contents of the edit control to the clipboard.

SendDlgItemMessage(hdlg, ID_MYEDITCONTROL,
    EM_SETSEL, 0, MAKELONG(0, -1));
SendDlgItemMessage(hdlg, ID_MYEDITCONTROL,
    WM_COPY, 0, 0L);

See Also

WM_CLEAR, WM_CUT, WM_PASTE