SftPrintPreview/OCX 1.0

SftPrintPreviewRenderingInfo Record/Structure

Softel vdm, Inc.

Contains information needed to render one page.

Syntax       

VB.NET

Structure SftPrintPreviewRenderingInfo

   Dim Function As SftPrintPreviewRenderContentConstants

Function RenderContent event must perform

   Dim RealPrinter As Boolean

Real Printer

   Dim Positioning As Boolean

Positioning Only

   Dim hDC As Integer

Output Device Context

   Dim hDCPrinter As Integer

Printer Device Context

   Dim hwndContent As Integer

Window Providing Content (Attributes + Data)

   Dim hwndData As Integer

Window Providing Content (Data Only)

   Dim CurrentPage As Integer

Current Page Number (0..n)

   Dim LastPage As Integer

Last Known Page (0..n)

   Dim PageRectPrinterPix As tagRECT

Page rectangle (entire page) in pixels

   Dim PageRectPrinter As SftRectFloat

Page rectangle (entire page) in inches

   Dim PrintableRectPrinterPix As tagRECT

Printable portion of page in pixels

   Dim PrintableRectPrinter As SftRectFloat

Printable portion of page in inches

   Dim MarginRectPrinterPix As tagRECT

Printable area defined inside user-defined margins in pixels

   Dim MarginRectPrinter As SftRectFloat

Printable area defined inside user-defined margins in inches

   Dim ClientRectPix As tagRECT

Current page in pixels

   Dim ClientRect As SftRectFloat

Current page in inches

   Dim OutputRectDisplayPix As tagRECT

Output area in pixels

   Dim OutputRectDisplay As SftRectFloat

Output area in inches

   Dim ContentSizing As SftPrintPreviewContentSizingConstants

Desired content sizing

   Dim ContentWidthPix As Integer

Best content width in pixels

   Dim ContentWidth As Single

Best content width in inches

   Dim ContentHeightPix As Integer

Best content height in pixels

   Dim ContentHeight As Single

Best content height in inches

   Dim MaxContentWidthPix As Integer

Maximum content width in pixels

   Dim MaxContentWidth As Single

Maximum content width in inches

   Dim MaxContentHeightPix As Integer

Maximum content height in pixels

   Dim MaxContentHeight As Single

Maximum content height in inches

   Dim RenderingWorkArea As Integer

Application-defined workarea

   Dim PreviousVisitedPageInfo As Object

Info for previous page (preceding current page)

   Dim VisitedPageInfo As Object

Info for the current page if available

End Structure

VB

Type SftPrintPreviewRenderingInfo

   Function As SftPrintPreviewRenderContentConstants

Function RenderContent event must perform

   RealPrinter As Boolean

Real Printer

   Positioning As Boolean

Positioning Only

   hDC As Long

Output Device Context

   hDCPrinter As Long

Printer Device Context

   hwndContent As Long

Window Providing Content (Attributes + Data)

   hwndData As Long

Window Providing Content (Data Only)

   CurrentPage As Long

Current Page Number (0..n)

   LastPage As Long

Last Known Page (0..n)

   PageRectPrinterPix As tagRECT

Page rectangle (entire page) in pixels

   PageRectPrinter As SftRectFloat

Page rectangle (entire page) in inches

   PrintableRectPrinterPix As tagRECT

Printable portion of page in pixels

   PrintableRectPrinter As SftRectFloat

Printable portion of page in inches

   MarginRectPrinterPix As tagRECT

Printable area defined inside user-defined margins in pixels

   MarginRectPrinter As SftRectFloat

Printable area defined inside user-defined margins in inches

   ClientRectPix As tagRECT

Current page in pixels

   ClientRect As SftRectFloat

Current page in inches

   OutputRectDisplayPix As tagRECT

Output area in pixels

   OutputRectDisplay As SftRectFloat

Output area in inches

   ContentSizing As SftPrintPreviewContentSizingConstants

Desired content sizing

   ContentWidthPix As Integer

Best content width in pixels

   ContentWidth As Single

Best content width in inches

   ContentHeightPix As Integer

Best content height in pixels

   ContentHeight As Single

Best content height in inches

   MaxContentWidthPix As Integer

Maximum content width in pixels

   MaxContentWidth As Single

Maximum content width in inches

   MaxContentHeightPix As Integer

Maximum content height in pixels

   MaxContentHeight As Single

Maximum content height in inches

   RenderingWorkArea As Long

Application-defined workarea

   PreviousVisitedPageInfo As Variant

Info for previous page (preceding current page)

   VisitedPageInfo As Variant

Info for the current page if available

End Type

C#.NET

struct SftPrintPreviewRenderingInfo {

   SftPrintPreviewRenderContentConstants Function;

Function RenderContent event must perform

   bool RealPrinter;

Real Printer

   bool Positioning;

Positioning Only

   int hDC;

Output Device Context

   int hDCPrinter;

Printer Device Context

   int hwndContent;

Window Providing Content (Attributes + Data)

   int hwndData;

Window Providing Content (Data Only)

   int CurrentPage;

Current Page Number (0..n)

   int LastPage;

Last Known Page (0..n)

   tagRECT PageRectPrinterPix;

Page rectangle (entire page) in pixels

   SftRectFloat PageRectPrinter;

Page rectangle (entire page) in inches

   tagRECT PrintableRectPrinterPix;

Printable portion of page in pixels

   SftRectFloat PrintableRectPrinter;

Printable portion of page in inches

   tagRECT MarginRectPrinterPix;

Printable area defined inside user-defined margins in pixels

   SftRectFloat MarginRectPrinter;

Printable area defined inside user-defined margins in inches

   tagRECT ClientRectPix;

Current page in pixels

   SftRectFloat ClientRect;

Current page in inches

   tagRECT OutputRectDisplayPix;

Output area in pixels

   SftRectFloat OutputRectDisplay;

Output area in inches

   SftPrintPreviewContentSizingConstants ContentSizing;

Desired content sizing

   int ContentWidthPix;

Best content width in pixels

   float ContentWidth;

Best content width in inches

   int ContentHeightPix;

Best content height in pixels

   float ContentHeight;

Best content height in inches

   int MaxContentWidthPix;

Maximum content width in pixels

   float MaxContentWidth;

Maximum content width in inches

   int MaxContentHeightPix;

Maximum content height in pixels

   float MaxContentHeight;

Maximum content height in inches

   int RenderingWorkArea;

Application-defined workarea

   object PreviousVisitedPageInfo;

Info for previous page (preceding current page)

   object VisitedPageInfo;

Info for the current page if available

};

VC++

struct SftPrintPreviewRenderingInfo {

   enum SftPrintPreviewRenderContentConstants Function;

Function RenderContent event must perform

   VARIANT_BOOL RealPrinter;

Real Printer

   VARIANT_BOOL Positioning;

Positioning Only

   long hDC;

Output Device Context

   long hDCPrinter;

Printer Device Context

   long hwndContent;

Window Providing Content (Attributes + Data)

   long hwndData;

Window Providing Content (Data Only)

   long CurrentPage;

Current Page Number (0..n)

   long LastPage;

Last Known Page (0..n)

   struct tagRECT PageRectPrinterPix;

Page rectangle (entire page) in pixels

   struct SftRectFloat PageRectPrinter;

Page rectangle (entire page) in inches

   struct tagRECT PrintableRectPrinterPix;

Printable portion of page in pixels

   struct SftRectFloat PrintableRectPrinter;

Printable portion of page in inches

   struct tagRECT MarginRectPrinterPix;

Printable area defined inside user-defined margins in pixels

   struct SftRectFloat MarginRectPrinter;

Printable area defined inside user-defined margins in inches

   struct tagRECT ClientRectPix;

Current page in pixels

   struct SftRectFloat ClientRect;

Current page in inches

   struct tagRECT OutputRectDisplayPix;

Output area in pixels

   struct SftRectFloat OutputRectDisplay;

Output area in inches

   enum SftPrintPreviewContentSizingConstants ContentSizing;

Desired content sizing

   int ContentWidthPix;

Best content width in pixels

   float ContentWidth;

Best content width in inches

   int ContentHeightPix;

Best content height in pixels

   float ContentHeight;

Best content height in inches

   int MaxContentWidthPix;

Maximum content width in pixels

   float MaxContentWidth;

Maximum content width in inches

   int MaxContentHeightPix;

Maximum content height in pixels

   float MaxContentHeight;

Maximum content height in inches

   long RenderingWorkArea;

Application-defined workarea

   const _variant_t& PreviousVisitedPageInfo;

Info for previous page (preceding current page)

   const _variant_t& VisitedPageInfo;

Info for the current page if available

};

C

struct SftPrintPreviewRenderingInfo {

   enum SftPrintPreviewRenderContentConstants Function;

Function RenderContent event must perform

   VARIANT_BOOL RealPrinter;

Real Printer

   VARIANT_BOOL Positioning;

Positioning Only

   long hDC;

Output Device Context

   long hDCPrinter;

Printer Device Context

   long hwndContent;

Window Providing Content (Attributes + Data)

   long hwndData;

Window Providing Content (Data Only)

   long CurrentPage;

Current Page Number (0..n)

   long LastPage;

Last Known Page (0..n)

   struct tagRECT PageRectPrinterPix;

Page rectangle (entire page) in pixels

   struct SftRectFloat PageRectPrinter;

Page rectangle (entire page) in inches

   struct tagRECT PrintableRectPrinterPix;

Printable portion of page in pixels

   struct SftRectFloat PrintableRectPrinter;

Printable portion of page in inches

   struct tagRECT MarginRectPrinterPix;

Printable area defined inside user-defined margins in pixels

   struct SftRectFloat MarginRectPrinter;

Printable area defined inside user-defined margins in inches

   struct tagRECT ClientRectPix;

Current page in pixels

   struct SftRectFloat ClientRect;

Current page in inches

   struct tagRECT OutputRectDisplayPix;

Output area in pixels

   struct SftRectFloat OutputRectDisplay;

Output area in inches

   enum SftPrintPreviewContentSizingConstants ContentSizing;

Desired content sizing

   int ContentWidthPix;

Best content width in pixels

   float ContentWidth;

Best content width in inches

   int ContentHeightPix;

Best content height in pixels

   float ContentHeight;

Best content height in inches

   int MaxContentWidthPix;

Maximum content width in pixels

   float MaxContentWidth;

Maximum content width in inches

   int MaxContentHeightPix;

Maximum content height in pixels

   float MaxContentHeight;

Maximum content height in inches

   long RenderingWorkArea;

Application-defined workarea

   VARIANT PreviousVisitedPageInfo;

Info for previous page (preceding current page)

   VARIANT VisitedPageInfo;

Info for the current page if available

};

Delphi

SftPrintPreviewRenderingInfo = record

   Function : TOleEnum;

Function RenderContent event must perform

   RealPrinter : WordBool;

Real Printer

   Positioning : WordBool;

Positioning Only

   hDC : Integer;

Output Device Context

   hDCPrinter : Integer;

Printer Device Context

   hwndContent : Integer;

Window Providing Content (Attributes + Data)

   hwndData : Integer;

Window Providing Content (Data Only)

   CurrentPage : Integer;

Current Page Number (0..n)

   LastPage : Integer;

Last Known Page (0..n)

   PageRectPrinterPix : OleVariant;

Page rectangle (entire page) in pixels

   PageRectPrinter : OleVariant;

Page rectangle (entire page) in inches

   PrintableRectPrinterPix : OleVariant;

Printable portion of page in pixels

   PrintableRectPrinter : OleVariant;

Printable portion of page in inches

   MarginRectPrinterPix : OleVariant;

Printable area defined inside user-defined margins in pixels

   MarginRectPrinter : OleVariant;

Printable area defined inside user-defined margins in inches

   ClientRectPix : OleVariant;

Current page in pixels

   ClientRect : OleVariant;

Current page in inches

   OutputRectDisplayPix : OleVariant;

Output area in pixels

   OutputRectDisplay : OleVariant;

Output area in inches

   ContentSizing : TOleEnum;

Desired content sizing

   ContentWidthPix : Integer;

Best content width in pixels

   ContentWidth : Single;

Best content width in inches

   ContentHeightPix : Integer;

Best content height in pixels

   ContentHeight : Single;

Best content height in inches

   MaxContentWidthPix : Integer;

Maximum content width in pixels

   MaxContentWidth : Single;

Maximum content width in inches

   MaxContentHeightPix : Integer;

Maximum content height in pixels

   MaxContentHeight : Single;

Maximum content height in inches

   RenderingWorkArea : Integer;

Application-defined workarea

   PreviousVisitedPageInfo : OleVariant;

Info for previous page (preceding current page)

   VisitedPageInfo : OleVariant;

Info for the current page if available

end;

Members

Function

Defines the function the RenderContent event must perform (see SftPrintPreviewRenderContentConstants).

RealPrinter

Set to True if printing to a real printer (i.e., not preview display), False otherwise.

Positioning

Set to True if the RenderContent event is called for formatting purposes only to subsequently render a later page, False otherwise.

hDC

Defines the output device context.  All output is rendered using this device context.

hDCPrinter

Defines the printer device context.  When generating a preview display, the output device context hDC describes a screen device or metafile context.  To query attributes of the actual printer device, the hDCPrinter device context must be used.

hwndContent

Defines the window handle, describing the window to be rendered.  Same as ContentProvider property.

hwndData

Defines the window handle, describing the window to be rendered.  Same as DataProvider property.

CurrentPage

Defines the current page being rendered.  Page numbers are zero-based.

LastPage

Defines the currently last know (visited) page.  Page numbers are zero-based.

PageRectPrinterPix

A rectangle describing the dimensions of the page in printer coordinates (in pixels).

PageRectPrinter

A rectangle describing the dimensions of the page (in inches).

PrintableRectPrinterPix

A rectangle describing the dimensions of the physically printable area on the page in printer coordinates (in pixels).

PrintableRectPrinter

A rectangle describing the dimensions of the physically printable area on the page (in inches).

MarginRectPrinterPix

A rectangle describing the dimensions of the printable area, excluding all margins, on the page in printer coordinates (in pixels). 

MarginRectPrinter

A rectangle describing the dimensions of the printable area, excluding all margins, on the page (in inches).

ClientRectPix

A rectangle describing the dimensions of the printable area, excluding all margins, on the page in printer coordinates (pixels).  This area is available for any application-generated output and reflects the actual output area of the output device context hDC

ClientRect

A rectangle describing the dimensions of the printable area, excluding all margins, on the page (in inches).  This area is available for any application-generated output and reflects the actual output area of the output device context hDC

OutputRectDisplayPix

A rectangle describing the dimensions of the printable area, excluding all margins, on the page (in pixels).  

OutputRectDisplay

A rectangle describing the dimensions of the printable area, excluding all margins, on the page (in inches).

ContentSizing

Desired content sizing as defines using the ContentSizing property.

ContentWidthPix

Reserved for future use.  Defines the best width for the current output (in pixels).

ContentWidth

Reserved for future use.  Defines the best width for the current output (in inches).

ContentHeightPix

Reserved for future use.  Defines the best height for the current output (in pixels). 

ContentHeight

Reserved for future use.  Defines the best height for the current output (in inches). 

MaxContentWidthPix

Reserved for future use.  Defines the maximum available width for the current output (in pixels). 

MaxContentWidth

Reserved for future use.  Defines the maximum available width for the current output (in inches). 

MaxContentHeightPix

Reserved for future use.  Defines the maximum available height for the current output (in pixels).

MaxContentHeight

Reserved for future use.  Defines the maximum available height for the current output (in inches).

RenderingWorkArea

The RenderingWorkArea value is defined using the ContentProviderCallback or ContentProviderCallbackX method and is only valid while handling a RenderContent event.  It is used to hold an application-specific value.

PreviousVisitedPageInfo

When the RenderContent event is called with a Function of renderSftPrintPreview_1Page, the information returned as the VisitedPageInfo value in the RenderContent event for the preceding page is available to the application in the PreviousVisitedPageInfo member.

VisitedPageInfo

When the RenderContent event is called with a Function of renderSftPrintPreview_1Page, the information returned as the VisitedPageInfo value in the RenderContent event for the current page CurrentPage during a prior RenderContent event is made available.


Feedback / comments / error reports for this topic
© 2004 - Softel vdm, Inc. - www.windowscontrols.com