Definition
typedef struct tagExportShapeInfo { ShapeType type; CShapeRecord* pShape; size_t nAttributeCount; COLORREF clr; size_t nPenWidth; int nIconIndex; PFNATTRIBUTENAMECALLBACK pfnANCB; PFNATTRIBUTECALLBACK pfnACB; PFNATTRIBUTETYPECALLBACK pfnATCB; PFNMAPIMAGECALLBACK pfnMICB; int nPenStyle; COLORREF clrFill; bool bIsSelected; const char *pszLabel; } ExportShapeInfo;
Members
type [in]
A ShapeType value describing what type is being exported.
pShape [in]
A pointer to a CShapeRecord to be exported.
nAttributeCount [in]
The number of attributes available for pShape.
clr [in]
This is the main color of the theme.
nPenWidth [in]
The width of the pen used to draw this layer. Not valid for point layers.
nIconIndex [in]
The index of the symbol used for this layer. Valid only for point layers.
pfnANCB [in]
A callback function of type PFNATTRIBUTENAMECALLBACK. This function may be called to get the name of an attribute.
pfnACB [in]
A callback function of type PFNATTRIBUTECALLBACK. This function may be called to get the value of an attribute for a given shape.
pfnATCB [in]
A callback function of type PFNATTRIBUTETYPECALLBACK. This function may be called to get the type of an attribute. See the remarks section for more information.
pfnMICB [in]
A callback function of type PFNMAPIMAGECALLBACK. This function may be called to get a map image which can be used as a thumb nail in the export. See the remarks section for more information.
nPenStyle [in]
Windows GDI pen style.
clrFill [in]
Fill color for polygons.
bIsSelected [in]
Indicates whether this shape is selected or not in ShapeUp.
pszLabel [in]
The shapes label/InfoTip.
Remarks
The pfnATCB can return one of the following values:
AT_STRING
AT_INT
AT_DOUBLE
AT_DATE
AT_BOOL
Since one ore more columns can be part of a primary key, the flag AT_PRIMARYKEY can be set. To get the type, make sure this bit is masked as: (type & ~AT_PRIMARYKEY).
The pfnMICB can be used to generate a map image of any area. It returns a handle to a bitmap (HBITMAP) if it succeeds, or null otherwise. The caller is responsible for destroying the returned bitmap object using ::DestroyObject(). At least 4 parameters needs to be specified in order to generate an image. These are the image width and height in pixels, and the geographical center position (EW and NS). Optionally, one can set another two parameters to customize the scale. If this is not done, the same scale as the current one in the map view will be used. For more information see the MapImageInfo structure.
See Also
Exporter API, fnExportShape, MapImageInfo