ImageGear for C and C++ on Windows v19.7 - Updated
IG_dspl_free_grp_id_get
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Display Functions > IG_dspl_free_grp_id_get

This function searches and returns the first free unused group identifier.

Declaration:

 
Copy Code
AT_ERRCOUNT   ACCUAPI  IG_dspl_free_grp_id_get(
        [IN] HIGEAR hIGear,
        [IN] DWORD dwMin,
        [OUT] LPDWORD lpdwFreeGrpId
);

Arguments:

Name Type Description
hIGear HIGEAR ImageGear handle of image.
dwMin DWORD Minimum value from which ImageGear should start to search.
lpdwFreeGrpId LPDWORD Pointer to where to return free group identifier.

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:

Display, MFC, Print

Example:

 
Copy Code
HIGEAR hIGear;   /* HIGEAR handle of image   */ 
DWORD nGrpID;   /* display group identifier  */
 ...
IG_dspl_free_grp_id_get( hIGear, 0, &nGrpID );
 ...

Remarks:

This function also sets a flag so the returned group is marked as used and the next call to this function with the same parameters returns another group id. To mark a group as unused and reset it to the default values, call function IG_dspl_grp_reset().