VAPIMWP_DRAW_DRAWTOFILE
Draws a page of a document to a graphic file (thumbnail). This is a parameter of the VAPIM_DRAW message.
Syntax
#include <kvvapi.h> SendMessage(hWndVAPI,VAPIM_DRAW, VAPIMWP_DRAW_DRAWTOFILE, (LPARAM) (TPVAPIDrawFileInfo*) pDrawInfo );
Arguments
|
Argument |
Description |
|---|---|
|
|
The handle of the VAPI window. |
|
|
A pointer to a TPVAPIDrawFileInfo structure that contains information used for drawing a page to a file. To draw pages in any order, set the |
Returns
SendMessage() returns:
-
VAPI_RETURN_SUCCESSif the call succeeds. -
VAPI_RETURN_NOT_INITIALIZEDif the drawing routines have not been initialized. -
VAPI_RETURN_NO_PAGEif the requested page does not exist, or is being displayed before all previous pages have been displayed. -
VAPI_RETURN_NOT_AVAILABLEif the document does not support this feature (for example, ZIP files, video, audio). -
VAPI_RETURN_ERRORif an error has occurred.
Discussion
- Before you send this message, initialize VAPI by sending the VAPIMWP_DRAW_INIT message, and then open the document by sending the VAPIMWP_INIT_OPEN_DOCUMENT message.
-
Page numbers start at 0. For example, set
uPageNumbersto0to draw page 1, and to1to draw page 2. For word processing documents, pages must be drawn sequentially. For example, to draw page 3, you must first draw pages 0 and 1.To draw pages in any order, set the
bWaitparameter in the TPVAPIOpenDocumentInfo structure toFALSE.