uProcessFlags

Flags that determine the behavior of the border removal process. Flags may be combined using a bitwise OR. Possible values are:

Value

Meaning

BORDER_SINGLE_REGION:

For each border found by the BorderRemove method, if the DocCleanSuccess property is set to SUCCESS_REMOVE in the OnBorderRemove, the removed border is added to an internal single region. If the DocCleanSuccess propertyis set to SUCCESS_NOREMOVE, the border is not added to the single region. When the BorderRemove method returns, either the DocCleanBitmap property or the hDocCleanRgn property will be set to a region that contains all the removed borders. If BORDER_LEAD_REGION is also set, the DocCleanBitmap property will be set to a bitmap that has a LEAD region that contains all the removed borders. If BORDER_LEAD_REGION is not set, hDocCleanRgn is set to a Windows region that contains all the removed borders. When the region (either LEAD or Windows) is no longer needed, it must be destroyed.

BORDER_LEAD_REGION

When the BorderRemove method returns, the DocCleanBitmap property is set to a bitmap that also contains a region with all the removed lines. This flag must be used in conjunction with BORDER_SINGLE_REGION. Pass BORDER_SINGLE_REGION | BORDER_LEAD_REGION in the uProcessFlags parameter of the BorderRemove method. The DocCleanBitmap property will be set when the BorderRemove method returns.

BORDER_IMAGE_UNCHANGED

The original image is unchanged.

BORDER_CALLBACK_REGION

The OnBorderRemove event receives a Windows region that contains the current border to be removed. Setting this flag lets the user create his or her own composite of removed borders by combining the regions received by the event, if the DocCleanSuccess property is set to SUCCESS_REMOVE in the event. The regions can be combined using a logical OR operator. Combining all regions received by the event, that are removed, results in a region identical to the region created when BORDER_SINGLE_REGION is set in uProcessFlags. When the region received by the event is no longer needed, it must be destroyed.

BORDER_USE_VARIANCE

Consider border variance when performing border removal. If this flag is passed, the nVariance parameter of this method is used. If this flag is not passed, the nVariance parameter is ignored.