SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Contains information needed to render one page.
VB.NET | Structure SftPrintPreviewRenderingInfo | |
Dim Function As SftPrintPreviewRenderContentConstants | Function RenderContent event must perform | |
Dim RealPrinter As Boolean | Function RenderContent event must perform | |
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 Long | 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 | Function RenderContent event must perform | |
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; | Function RenderContent event must perform | |
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 | |
}; | ||
C, C++ | struct SftPrintPreviewRenderingInfo { | |
enum SftPrintPreviewRenderContentConstants Function; | Function RenderContent event must perform | |
VARIANT_BOOL RealPrinter; | Function RenderContent event must perform | |
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 | |
}; |
Defines the function the RenderContent event must perform (see SftPrintPreviewRenderContentConstants).
Set to True if printing to a real printer (i.e., not preview display), False otherwise.
Set to True if the RenderContent event is called for formatting purposes only to subsequently render a later page, False otherwise.
Defines the output device context. All output is rendered using this device context.
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.
Defines the window handle, describing the window to be rendered. Same as ContentProvider property.
Defines the window handle, describing the window to be rendered. Same as DataProvider property.
Defines the current page being rendered. Page numbers are zero-based.
Defines the currently last know (visited) page. Page numbers are zero-based.
A rectangle describing the dimensions of the page in printer coordinates (in pixels).
A rectangle describing the dimensions of the page (in inches).
A rectangle describing the dimensions of the physically printable area on the page in printer coordinates (in pixels).
A rectangle describing the dimensions of the physically printable area on the page (in inches).
A rectangle describing the dimensions of the printable area, excluding all margins, on the page in printer coordinates (in pixels).
A rectangle describing the dimensions of the printable area, excluding all margins, on the page (in inches).
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.
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.
A rectangle describing the dimensions of the printable area, excluding all margins, on the page (in pixels).
A rectangle describing the dimensions of the printable area, excluding all margins, on the page (in inches).
Desired content sizing as defines using the ContentSizing property.
Reserved for future use. Defines the best width for the current output (in pixels).
Reserved for future use. Defines the best width for the current output (in inches).
Reserved for future use. Defines the best height for the current output (in pixels).
Reserved for future use. Defines the best height for the current output (in inches).
Reserved for future use. Defines the maximum available width for the current output (in pixels).
Reserved for future use. Defines the maximum available width for the current output (in inches).
Reserved for future use. Defines the maximum available height for the current output (in pixels).
Reserved for future use. Defines the maximum available height for the current output (in inches).
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.
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.
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.
MessageBox(_T("Sorry, this sample doesn't offer a help file")); } void CSftPrintPreviewDlg::OnRenderContentSftPrintPreview1(long Function, long FAR* LastPage, VARIANT FAR* VisitedPageInfo) { // This function is called by SftPrintPreview to print pages, to initialize and // terminate printing (to prepare and free resources) and for page positioning if (Function == renderSftPrintPreview_Init) { SftPrintPreviewRenderingInfo I = m_vPrintPreview1->GetRenderingInfo(); int height = MulDiv(10, GetDeviceCaps((HDC)I.hDCPrinter, LOGPIXELSY), 72);// 10 point font m_PrintFont.CreateFont(- height, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE|DEFAULT_PITCH, _T("Arial")); _ASSERT(m_PrintFont.m_hObject); } else if (Function == renderSftPrintPreview_Term) m_PrintFont.DeleteObject();
See Also Object Hierarchy