| CB_fetchTEXT | Function (ROM Call 0xC2)

system.h

short CB_fetchTEXT (HANDLE *hText, unsigned long *len);

Fetches a text from the clipboard.

CB_fetchTEXT stores in the variable pointed to by hText the handle of the text stored in the clipboard (use HeapDeref to get actual pointer to the text). It also stores the length of the text in the variable pointed to by len.
CB_fetchTEXT returns TRUE if the operation was successful, else returns FALSE (i.e. if the clipboard is empty or trashed).
AMS will only store text in the clipboard and will always assume that it contains text. However, programs may try to store non-text data in it, although it's not a good practice, since it might cause strange things to happen on the calculator...
The clipboard handle is not locked, so it can be moved during heap compression.

Used by: TE_handleEvent

See also: CB_replaceTEXT