DlgCopy
DlgCopy
Copy selected text from editText item to TE scrap DialogPtr theDialog ; identifies dialog window with text to copy DlgCopy copies the current selection of the current editText item of a dialog into the TextEdit scrap. It is a quick way to process a copy command (C) event for a dialog.
theDialog is the address of a DialogRecord. it identifies the dialog containing the item to which the copy operation should be applied.
Notes: If the current dialog contains no editText items, or if none is active, this
function does nothing. Otherwise, it performs a TECopy on the currently-selected text.
The item number-1 of the active editText field is kept in the editField field
Thus, this call is functionally equivalent to:
if ( theDlgPeek -> editField > 0 ) {
}
typically performed in a filter function (see ModalDialog). In a modeless dialog, you should check for X, C, V, and B by examining the event record after calling IsDialogEvent and when present, use the DlgXxx calls You do not need to support cut-and-paste in editText items, but since it is
easy to do, it is recommended.