Hide

SftPrintPreview/DLL 2.0 - Print Preview Control for C/C++

Display
Print

SFTPRINTPREVIEW_ZOOMIN Structure

The SFTPRINTPREVIEW_ZOOMIN structure is used with the ZoomIn function to redefine the preview location (zooming in or out).

typedef struct tagSftPrintPreviewZoomInParms {
     int zoomFactor; // +/- zoom
     double centerPosX, centerPosY; // point on page in inches, to be zoomed or -1.0, -1.0 to center
     int offsetX, offsetY; // center point offset from display center (in pixels)
} SFTPRINTPREVIEW_ZOOMIN, * LPSFTPRINTPREVIEW_ZOOMIN;
typedef const SFTPRINTPREVIEW_ZOOMIN * LPCSFTPRINTPREVIEW_ZOOMIN;

Members

zoomFactor

A relative zoom factor (positive or negative), which is added to the current zoom factor. The new zoom factor value is used to format and display the currently selected page(s).

centerPosX

Defines the horizontal position (in inches), relative to the top, left corner of the printed/previewed page (in printer dimensions) to be centered if possible. If -1 is specified, the top, left corner of the page is made visible.

centerPosY

Defines the vertical position (in inches), relative to the top, left corner of the printed/previewed page (in printer dimensions) to be centered if possible. If -1 is specified, the top, left corner of the page is made visible.

offsetX

Defines the horizontal offset (in pixels) where the center point (centerPosX, centerPosY) is to be displayed, relative to the center of the display area. Set to 0 to center horizontally.

offsetY

Defines the vertical offset (in pixels) where the center point (centerPosX, centerPosY) is to be displayed, relative to the center of the display area. Set to 0 to center vertically.

Comments

The SFTPRINTPREVIEW_ZOOMIN structure is used with the ZoomIn function to redefine the preview location (zooming in or out).

Example

C

SFTPRINTPREVIEW_ZOOMIN z;
memset(&z, 0, sizeof(z));
z.zoomFactor = +100;
z.centerPosX = z.centerPosY = -1.0;
zoom.displayX = zoom.displayY = 0;
SftPrintPreview_ZoomIn(hwndPreview, &z);

C++

SFTPRINTPREVIEW_ZOOMIN z;
memset(&z, 0, sizeof(z));
z.zoomFactor = +100;
z.centerPosX = z.centerPosY = -1.0;
zoom.displayX = zoom.displayY = 0;
m_Preview.ZoomIn(&z);

See Also C/C++ API | C++ Classes | Notifications


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.