Version: 01.10.00 - last Update: Tuesday, October 13, 2009, 12:30:00
Foxtools Editor Support Functions
_EDCOPY
_EdCopy() Copies the highlighted text of the editor session passed in <nWHAND> parameter.
VFP Syntax
= _EdCopy(nWHAND)
Parameters
[in] nWHAND
Fox-window handle of the editor session to be closed.
Returns
VOID - no evaluable return value, coz always TRUE.
Remarks
You do not need to open the Windows Clipboard manually. _EdCopy() does the Windows Clipboard handling for you behind the scenes transparently. If no text is highlighted _EdCopy() just does nothing.
VFP Example(s)
Opening an editor session, selecting some text and finally copying the selected lines into Windows Clipboard:
*\\ Open editor session *\\ There should be some text in TEST.TXT nWHAND =_EDOPENFIL("TEST.TXT", 1) *\\ Start offset: row #1 nEDstart = _EDSKIPLIN(m.nWHAND,0,0) *\\ End offset: row #10 nEDend = _EDSKIPLIN(m.nWHAND,0,10) *\\ Highlight text block = _EDSELECT(m.nWHAND, m.nEDstart, m.nEDend) *\\ Finally copy selection to clipboard = _EDCOPY(m.nWHAND) *\\ Close editor session = _EDCLOSEFI(m.nWHAND, 0) *// Try to paste clipboard somewhere else