ImageGear Professional v18.1 > 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.
Copy Code
|
|
---|---|
AT_BOOL ACCUAPI IG_comm_comp_check( LPCHAR lpCompName ); |
Name | Type | Description |
lpCompName | LPCHAR | The Name of ImageGear Component attached to the main ImageGear module. |
TRUE - if component is attached successfully. FALSE - if not.
This function does not process image pixels.
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 ); } |
If component is attached it returns TRUE, if not - FALSE.
See also the section ImageGear Components.