Function : Item (Field)

NSFItemGetTextListEntry - Get an entry from a TYPE_TEXT_LIST Item.
----------------------------------------------------------------------------------------------------------

#include <nsfnote.h>

WORD LNPUBLIC NSFItemGetTextListEntry(
NOTEHANDLE note_handle,
const char far *item_name,
WORD entry_position,
char far *entry_text,
WORD text_len);

Description :

This function takes a handle to an open note, the name for the text list Item from which you wish to obtain a particular entry, the position of the entry in the text list, and the length of the text buffer that will receive the entry text. It returns the entry text in the buffer provided and the function itself returns the length of the entry.

Parameters :

Sample Usage :

/* Print the TEXT_LIST_ITEM */

num_entries = NSFItemGetTextListEntries(note1_handle,
                                          TEXT_LIST_ITEM);
for (counter = 0; counter < num_entries; counter++)
{
  text_len = NSFItemGetTextListEntry(note1_handle,
                   TEXT_LIST_ITEM, counter, text_buf2, LINEOTEXT-1);
  text_buf2[text_len] = '\0';
  printf("%s[%u]: %s\n", TEXT_LIST_ITEM, counter, text_buf2);
}


See Also :

NSFItemAppendTextList
----------------------------------------------------------------------------------------------------------