IN_DOCWIN lNewDocwinID;
long x1, y1, x2, y2;
/* In the active document window, auto crop the layer with an ID of 1026 to minimal size */
if ( ( nError = IN_CropLayer( 0, 0, 1026, IN_PREDEFINED_CROPSIZE_AUTO, 0, 0, 0, 0, 0, &lNewDocwinID ) ) != IN_SUCCESS )
{
ErrorHandler( nError, "Error message:" );
}