ImageGear for C and C++ on Windows v20.0 - Updated
IG_dspl_mapmode_get
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Display Functions > IG_dspl_mapmode_get

This function returns the current map mode and logical coordinate system where parameters such as ClipRect, DeviceRect and most others (except ImageRect) are stored.

Declaration:

 
Copy Code
AT_ERRCOUNT    ACCUAPI   IG_dspl_mapmode_get(
        [IN] HIGEAR hIGear,
        [IN] DWORD dwGrpID,
        [OUT] LPDWORD lpdwMapMode,
        [OUT] LPAT_RECTANGLE lpViewport,
        [OUT] LPAT_RECTANGLE lpWindow
);

Arguments:

Name Type Description
hIGear HIGEAR ImageGear handle of Image.
dwGrpID DWORD Identifier of group from which to get map mode options.
lpdwMapMode LPDWORD Pointer to the current value of option MapMode.
lpViewport LPAT_RECTANGLE Pointer to the current value of rectangle Viewport.
lpWindow LPAT_RECTANGLE Pointer to the current value of rectangle Window.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

None

Example:

 
Copy Code
HIGEAR            hIGear;     /* HIGEAR handle of image  */ 
DWORD           nGrpID;     /* display group identifier */
DWORD           dwMapMode;    /* map mode   */
AT_RECTANGLE            Viewport;     /* view port values    */
AT_RECTANGLE             Window;       /* window values  */
 ...
IG_dspl_mapmode_get( hIGear, nGrpID, &dwMapMode, &Viewport, &Window );
SetMapMode( dwMapMode );
SetWindowOrgEx( hDC, Window.x, Window.y, NULL );
SetWindowExtEx( hDC, Window.width, Window.height, NULL );
SetViewportOrgEx( hDC, Viewport.x, Viewport.y, NULL );
SetViewportExtEx( hDC, Viewport.width, Viewport.height, NULL );
 ...
Is this page helpful?
Yes No
Thanks for your feedback.