Returns the area that is cut off when cropping is enabled. Use the GetCropMode function to see how the cut off area is specified and call GetCropArea to retrieve the values. If GetCropMode returns 0, the return values of GetCropArea are the width of each margin that will be cut off.
If GetCropMode returns 1, the return values of GetCropArea specify a rectangle relative to the top left corner of the page that will be kept. Everything outside the rectangle will be cut off.
The values are specified in hundredths of inches.
GetCropArea(pDevMode As Long, ByRef dwCropLeft As Long, ByRef dwCropRight As Long, ByRef dwCropTop As Long, ByRef dwCropBottom As Long) As Boolean
Input value pDevMode |
- Handle to the BlackIceDEVMODE structure |
Output value dwCropLeft |
- Returns the width of the left margin that will be cut off, or coordinates of a rectangle in hundredths of inches that will be kept. |
Output value dwCropRight |
- Returns the width of the right margin that will be cut off, or coordinates of a rectangle in hundredths of inches that will be kept. |
Output value dwCropTop |
- Returns the height of the top margin that will be cut off, or coordinates of a rectangle in hundredths of inches that will be kept. |
Output value dwCropBottom |
- Returns the height of the bottom margin that will be cut off, or coordinates of a rectangle in hundredths of inches that will be kept. |
Return value |
- TRUE on success otherwise FALSE. |
NOTE: For 32-bit applications, use pDevMode as Integer, instead of Long.
Code Example
To cut off 1 inch off of each side of the page:
SetCropEnabled(pDevMode, TRUE);
SetCropMode(pDevMode, 0);
SetCropArea(pDevMode, 100, 100, 100, 100);
To cut off everything outside a 10-inch by 10-inch square that begins at 1 inch from the top of the page and 1 inch from the left side:
SetCropEnabled(pDevMode, TRUE);
SetCropMode(pDevMode, 1);
SetCropArea(pDevMode, 100, 1100, 100, 1100);