Click here for NewsObjects Overview
GetOldestHeadlineFromSelectionSet Method (Headline Control)
Windows - Visual C++

The GetOldestHeadlineFromSelectionSet method returns the least recently received headline in the specified selection set.

long result = GetOldestHeadlineFromSelectionSet(long selectionSetID, long* storyID, BSTR* headlineText);

The GetOldestHeadlineFromSelectionSet syntax has these parts:




A long integer containing the selection set ID.


A long integer that receives the story ID of the least recently received headline in the selection set.


A String that receives the text of the headline, as described in Remarks.


A long integer containing 0 if successful and an error code if not.

The GetOldestHeadlineFromSelectionSet method is used to sequentially obtain each headline in a selection set created with the SaveSelectionSet method. Once a headline is returned by GetOldestHeadlineFromSelectionSet it is no longer a part of the selection set. The next time that GetOldestHeadlineFromSelectionSet is called, the next least recently received headline will be returned and so on, until the selection set is empty, at which point the error code DDICTL_E_R_NOMORESELHDL is returned by the function.

Note that you should not use the value returned by GetNumberSelected to determine how many times to call GetOldestHeadlineFromSelectionSet, since it is possible that the number of headlines in the set may change.

Each field in the headlineText parameter is separated by a carriage return character (vbKeyReturn). The fields contained in the string are in the following order: Date, Time, Feed, Profiles, Rank, Headline.

See Also: DeleteSelectionSet GetNewestHeadlineFromSelectionSet GetNumberSelected SaveSelectionSet

Back to: Headline Methods