This example sends two MLM_QUERYSEL messages to obtain the beginning and ending points of the current selection, sends an MLM_SETIMPORTEXPORT message to set up the export buffer, and then sends an MLM_EXPORT message to export the selection into the buffer.

LONG lStart, cch;
CHAR szBuf[500];

lStart = (LONG) WinSendMsg(hwndMle, MLM_QUERYSEL,
    (MPARAM) MLFQS_MINSEL, (MPARAM) 0L);
cch = lStart - (LONG) WinSendMsg(hwndMle, MLM_QUERYSEL,
    (MPARAM) MLFQS_MAXSEL, (MPARAM) 0L);
WinSendMsg(hwndMle, MLM_SETIMPORTEXPORT,
    (MPARAM) szBuf, (MPARAM) sizeof(szBuf));
WinSendMsg(hwndMle, MLM_EXPORT, (MPARAM) &lStart, (MPARAM) &cch);


[Back] [Next]