ShowCanvasResizeDlg method (LEADDlgImage Control)

C++ Builder example

Delphi 4.0 example

 

Builder Syntax

int ShowCanvasResizeDlg(TWinControl* AOwnerCtrl);

Delphi Syntax

Function ShowCanvasResizeDlg (AOwnerCtrl: TWinControl ): L_INT;

Overview

Refer to Using Imaging Common Dialogs.

Remarks

Displays the CanvasResize dialog box.

The layout and action of the dialog depends on the flags set in the DlgFlags property. Possible options are:

Value

Meaning

DLG_CANVASRESIZE_AUTOPROCESS

[$00000001] Process the image on OK. The LEADImage property must be assigned a Main Control containing a valid bitmap before calling this method.

DLG_CANVASRESIZE_SHOW_CONTEXTHELP

[$00000002] Dialog should contain a context sensitive help icon.

DLG_CANVASRESIZE_SHOW_CURRENT_HEIGHT

[$00000004] Dialog should contain the Current Height static control.

DLG_CANVASRESIZE_SHOW_CURRENT_WIDTH

[$00000008] Dialog should contain the Current Width static control.

DLG_CANVASRESIZE_SHOW_HORIZPOS

[$00000010] Dialog should contain the Horizontal position.

DLG_CANVASRESIZE_SHOW_VERTPOS

[$00000020] Dialog should contain the Vertical position.

DLG_CANVASRESIZE_SHOW_BACKCOLOR

[$00000040] Dialog should contain a background color picker button.

DLG_CANVASRESIZE_SHOW_KEEPASPECT

[$00000080] Dialog should contain the Maintain Aspect Ratio check box.

If you include DLG_CANVASRESIZE_AUTOPROCESS in the DlgFlags property, the LEADImage property must be assigned a Main Control containing a valid bitmap before calling this method.

The properties associated with this dialog are:

CurrentWidth property.

CurrentHeight property.

TopLeftPoint property.

NewWidth property.

BackgroundColor property.

NewHeight property.

To include a Help button in the dialog, set the ShowHelpButton property to TRUE.

The Canvas Resize dialog can be seen below:

image\CanvasResize.gif

See Also

Elements:

CreateBitmap method, Combine method, CurrentWidth property, CurrentHeight property, TopLeftPoint property, NewWidth property, BackgroundColor property, NewHeight property, ShowHelpButton property, DlgFlags property, ZoomToFit Property, EnableMethodErrors property.

Topics:

Imaging Common Dialogs: Properties, Methods, and Events