Here you go. This is cut from one of my menu event handlers.
case EditCut: // Cut the text to the clipboard
fld = GetFocusObjectPtr();
if(fld)
FldCut(fld);
handled = true;
break;
case EditCopy: // Copy the text to the clipboard
fld = GetFocusObjectPtr();
if(fld)
FldCopy(fld);
handled = true;
break;
case EditPaste: // Do a paste from the clipboard
fld = GetFocusObjectPtr();
if(fld)
FldPaste(fld);
handled = true;
break;
case EditUndo: // Undo the last text change
fld = GetFocusObjectPtr();
if(fld)
FldUndo(fld);
handled = true;
break;
case EditSelectAll: // Select all of the text
fld = GetFocusObjectPtr();
if(fld)
FldSetSelection(fld, 0, FldGetTextLength(fld));
handled = true;
break;
--
Tim Astle
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/