DVP_LoadText(
LPDVPLOADTEXTDATA:lpLoadTextData
)
→ BOOL
Arguments
lpLoadTextData
Pointer to a
DVPLOADTEXTDATA structure (described below).
Return value
If you successfully load the text data and return an output stream in the
lpOutStream field, you must return
TRUE. Otherwise, return
FALSE.
Description
The DVP_LoadText function is called to load text from a file, which Opus will then display.
The DVPLOADTEXTDATA structure contains the following fields:
[in] UINT cbSize
Opus sets this field to the size of the structure before calling the function.
[in] DWORD dwFlags
Flags that indicate how to load the data. Currently the only defined flag is:
DVPCVF_FromStream - load from stream
[in] HWND hwndParent
A window handle to use while loading (in case any dialogs need to be displayed.)
[in] LPTSTR lpszFile
The name of the file to load the data from. You should only attempt to load from this file if the DVPCVF_FromStream flag is not set.
[in] LPSTREAM lpInStream
If DVPCVF_FromStream is set this will point to an IStream object to load the file from.
[in] DWORD dwStreamFlags
Stream flags if loading from a stream (DVPCVF_Slow, DVPCVF_NoRandomSeek)
[out] LPSTREAM lpOutStream
Set this to point to a stream containing the text data. You are responsible for creating this IStream object and writing the text data to it. Opus will call Release() on this stream pointer.
[out] int iOutTextType
You must set this to indicate the type of text data that has been written to the output stream. Valid types are
DVPText_Plain,
DVPText_Rich and
DVPText_HTML.
[in] HANDLE hAbortEvent
An abort event to let you detect when the user wants to abort the operation.