ImageGear for C and C++ on Windows v19.6 - Updated
IG_comm_comp_check
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Component Manager Functions > IG_comm_comp_check

This function allows you to check if the ImageGear component defined by lpCompName argument is currently attached or not.

Declaration:

 
Copy Code
AT_BOOL ACCUAPI IG_comm_comp_check(
        LPCHAR lpCompName
);

Arguments:

Name Type Description
lpCompName LPCHAR The Name of ImageGear Component attached to the main ImageGear module.

Return Value:

TRUE - if component is attached successfully. FALSE - if not.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

Filters, Multimedia, GUI Windows

Example:

 
Copy Code
bFoundLZW = IG_comm_comp_check("LZW");
if( bFoundLZW )
{
EnableMenuItem( GetMenu( hWnd ), ID_FILE_SAVE_INTERLIVED, MF_ENABLED|MF_BYCOMMAND );
EnableMenuItem( GetMenu( hWnd ), ID_FILE_SAVE_NONINTERLIVED, MF_ENABLED|MF_BYCOMMAND );
IG_fltr_ctrl_get(IG_FORMAT_GIF, "INTERLACE", FALSE, NULL, NULL, (LPVOID)&bInterlaced,
sizeof(&bInterlaced));
CheckMenuItem(GetMenu(hWnd), ID_FILE_SAVE_INTERLIVED, MF_BYCOMMAND |
bInterlaced?MF_CHECKED:MF_UNCHECKED);
CheckMenuItem(GetMenu(hWnd), ID_FILE_SAVE_NONINTERLIVED, MF_BYCOMMAND |
bInterlaced?MF_UNCHECKED:MF_CHECKED);
}else
{
EnableMenuItem( GetMenu( hWnd ), ID_FILE_SAVE_INTERLIVED, MF_GRAYED|MF_BYCOMMAND );
EnableMenuItem( GetMenu( hWnd ), ID_FILE_SAVE_NONINTERLIVED, MF_GRAYED|MF_BYCOMMAND );
}

Remarks:

If component is attached it returns TRUE, if not - FALSE.

See Attaching Components.