| Herd Software Development
|=
DaVinci Graphics Library
|==
DaVinci Documentation Home Search Order


ipExportExt: DaVinci export call syntax (obsolete)

IPERROR	FAR PASCAL	ipExportExt(
LPSTR pszName,
DWORD dwFlags,
FARPROC fnBck,
DWORD FileTyp,
HWND hWnd,
LPPOINT pnSize,
HDIB hDIB,
HMETAFILE hmf
LPMETARESOLUTION lpmr,
DWORD dummy);

pszName Filename (may be NULL). If not NULL and the IPF_FILEDIALOG flag is set, the name of the imported file is stored here. If pszName is specified prior to execution, that filename is used as the file save dialog's default. Therefore, pszName must always point at a valid file name string with <100 characters. If pszName is NULL, or points to an empty string, DaVinci builds a string with the list of valid extensions including *.BMP;*.TIF;*.GIF ..., etc.

If pszName points to a valid filename and the IPF_FILEDIALOG flag is not set in dwFlags, DaVinci exports the file specified in the parameter without displaying a file save dialog. If IPT_SELECT was specified as FileType, DaVinci automatically determines the input filetype using its extension. If the extension does not correspond to the default extensions used for supported formats, then DaVinci will attempt to determine its type by analyzing the file's contents. In the case of saved files, analysis of an existing file can naturally only be done if a file exists to analyze.

dwFlags A combination of flags of the IPF_xxxx series, combined with the bitwise OR operator ("|").

fnBck Address of a callback procedure used during conversion. This procedure can be used to respond to errors, update progress indicators, or allow abort of the import. Controls which directly or indirectly call import functions should remain disabled during export. Since DaVinci is not re-entrant, an error will be produced if DaVinci is asked to start an additional import function while the previous import is still in progress.

Assign FALSE as the callback's return value to abort the import operation.

If NULL is specified for fnBck, DaVinci watches only for the escape key and aborts if it is pressed. Windows multitasking is not supported.

In 16 bit Windows applications, fnBck must be exported using MakeProcInstance.

hWnd Handle of window used as parent for file dialog and error messages. Use the handle of the main or topmost dialog of the calling application wherever possible; assigning 0 as parent is not recommended.

FileTyp IPT_xxxx file type specification. Normally used if IPF_FILEDIALOG was not specified as a value for dwFlags. IPT_SELECT limits the application to this file type.

IPF_FILEDIALOG with IPT_SELECT should usually be specified in a combined manner.

pnSize Pointer to a POINT structure with the resolution specification of a memory bitmap. Used when converting a metafile to a DIB, can be NULL if conversion is not needed.

hDIB Handle of the DIB to be exported or NULL.

hmf Handle of the metafile to be exported or NULL.

lpmr Pointer to a METARESOLUTION structure with specifications of resolution (size in millimeters and aspect ratio) of the metafile. Can be NULL f hmf is NULL.

lParam Application defined 32-Bit value which is transferred to the callback function in fnBck or 0.

Return value

Returns 0 on success; otherwise returns an error corresponding to one of the IPE_xxxx error codes.

Remarks

This function is provided for backward compatibility with DaVinci 2.x. New and re-engineered applications should use the ipImportInd function.

See also:

Þ SaveDIBToFile

Þ ipExportInd