### QPx_SetAreaImporter

QPx_SetAreaImporter(areaRef; importerRef):error
| areaRef | Longint | QPix area reference
| importerRef | Longint | Reference to the importer to be used by the area
| error | Longint | Error result

Assigns a graphics importer instance to a QPix plug-in area.

The graphics importer reference importerRef must be a valid importer instance created with one of the importer creation commands (QPx_NewImporterForFile, QPx_NewImporterForData, QPx_NewImporter).

If the importer is succesfully assigned, the area takes its ownership. This means that you don't have to call QPx_FreeImporter to destroy the importer instance; it is freed when the area is destroyed by 4D or when another command changes the area's content data.

Example

``Assign an importer to a QPix area` `` `C_LONGINT($error)` `` `C_LONGINT(gQPixImporter)` `` `$error:=QPx_SetAreaImporter (gQPixArea;gQPixImporter)` `` `If ($error#qpx_noErr)` ``Handle the error` `End if`

Related commands

QPx_GetAreaImporter | Returns a reference to the graphic importer used by a QPix plug-in area

QPix © Escape
Generated by QDoc 2.8 on Wed, Feb 17, 2010 17:44:23