|
|
|
|
Purpose |
Retrieve the text of a news story. |
|
|
|
|
Call Syntax |
#include <aspen.h> … AspenRequest(slp->server_session, ASPEN_GetNewsStory, (long *)&StoryHandle[i], &story_text); … |
|
|
|
|
Parameters |
Input A pointer to a story’s handle.
Output A pointer to an ASPEN_GET_NUMBERED_STORY2_OUTPUT structure. |
|
|
|
|
Structures |
Typedef struct { char data[]; |
|
|
|
|
Remarks |
ASPEN_GetNewsStory requires a story handle.
To get a story’s handle, record it when AspenEvent() receives an ASPEN_NewsNotice. The handle is available in the ASPEN_NEWS_NOTICE structure.
A client application designed to allow a user to display a story based on headline content requires an intermediate AspenRequest() call with the ASPEN_GetStoryInfo service. ASPEN_GetStoryInfo returns headline information.
See ASPEN_GetNumberedStory for an alternate method of retrieving story text. |
|
|
|
|
Return Value |
|
|
|
|
|
See Also |
|
|
|
|
|
Example |
void CNewsDlg::OnDoubleClickNews() { ASPEN_GET_NUMBERED_STORY2_OUTPUT *story_text; server_list *slp = list; CString strStory; int retval,i; SetDlgItemText(EDIT_NEWSHISTORY_TEXT, "");
CWnd *News = FindWindow(NULL,"AspenClient News"); CListBox *pList = ((CListBox *)News->GetDlgItem(LIST_NEWS_STORY)); i = pList->GetCurSel(); retval = AspenRequest(slp->server_session, ASPEN_GetNewsStory, (long *)&StoryHandle[i], &story_text); if (retval == ASPEN_OK) { strStory.Format("%s",story_text->data); m_NewsText.AppendNewsText(strStory); } } |
©2006 Aspen Research Group, Ltd. All rights reserved. Terms of Use.