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
Defines the control that provides printable content.
Get
VB.NET | Handle = object.ContentProvider As Integer |
VB | Handle = object.ContentProvider As Long |
C#.NET | int Handle = object.ContentProvider; |
VC++ | long Handle = object->ContentProvider; long Handle = object->GetContentProvider(); |
C | HRESULT object->get_ContentProvider(long* Handle); |
Put
VB.NET | object.ContentProvider = Handle As Integer |
VB | object.ContentProvider = Handle As Long |
C#.NET | int object.ContentProvider = Handle; |
VC++ | long object->ContentProvider = Handle; void object->PutContentProvider(long Handle); |
C | HRESULT object->put_ContentProvider(long Handle); |
object
Handle
Defines the control that provides printable content.
The ContentProvider property defines the control that provides printable content.
The window defined using the ContentProvider property must support printing and print preview using the SFTPRINTPREVIEW_CONTENTWINDOWMESSAGE protocol. This protocol is defined by the product SftPrintPreview/DLL.
SftTree/DLL and SftTree/OCX 5.0 (and up) support this protocol and can be rendered by setting the ContentProvider property to the window handle of a SftTree/DLL or SftTree/OCX control. The DataProvider property is also supported for use with SftTree/DLL or SftTree/OCX controls. All rendering is provided by SftTree/DLL or SftTree/OCX through the SFTPRINTPREVIEW_CONTENTWINDOWMESSAGE protocol. The RenderContent event is not used.
The use of the ContentProvider property overrides settings defined using a prior call to the ContentProviderCallback or ContentProviderCallbackX methods.
RichEdit controls require the use of the RenderRichEdit or RenderRichEditX property values as a CallbackPointer for the ContentProviderCallback or ContentProviderCallbackX methods. The ContentProvider property is not used. The RenderRichEdit function, provided by SftPrintPreview/OCX, provides all rendering support for RichEdit controls. The RenderContent event is not used.
For application-generated output, the ContentProvider property is not used. The ContentProviderCallback or ContentProviderCallbackX methods are used with a CallbackPointer value of 0. The RenderContent event is used to render pages.
AxSftTree1.Items.RecalcHorizontalExtent() ' update horizontal scroll bar AxSftTree1.get_Item(0).Selected = True AxSftTree1.Items.Current = 0 CopyImageFromCurrentItem() ' Connect the tree control to the print preview control AxSftPrintPreview1.ContentProvider = AxSftTree1.hWnd End Sub Private Sub AxSftTree1_ItemClick(ByVal sender As Object, ByVal e As AxSftTreeLib65._DSftTreeEvents_ItemClickEvent) Handles axSftTree1.ItemClick Dim AreaType As SftTreeAreaTypeConstants AreaType = e.areaType If AreaType = SftTreeAreaTypeConstants.constSftTreeExpandAll Then
.Item(0).Selected = True .Items.Current = 0 CopyImageFromCurrentItem End With ' Connect the tree control to the print preview control SftPrintPreview1.ContentProvider = SftTree1.hWnd End Sub Private Sub SftTree1_ItemClick(ByVal ItemIndex As Long, ByVal ColIndex As Integer, ByVal AreaType As Integer, ByVal Button As Integer, ByVal Shift As Integer) Dim Area As SftTreeAreaTypeConstants Area = AreaType If Area = constSftTreeExpandAll Then SftTree1.Item(ItemIndex).Expand True, True
axSftTree1.Items.RecalcHorizontalExtent(); // update horizontal scroll bar axSftTree1.get_Item(0).Selected = true; axSftTree1.Items.Current = 0; CopyImageFromCurrentItem(); // Connect the tree control to the print preview control axSftPrintPreview1.ContentProvider = axSftTree1.hWnd; } private void axSftTree1_ItemClick(object sender, AxSftTreeLib65._DSftTreeEvents_ItemClickEvent e) { SftTreeAreaTypeConstants areaType = (SftTreeAreaTypeConstants) e.areaType; if (areaType == SftTreeAreaTypeConstants.constSftTreeExpandAll)
m_vTree->Items->RecalcHorizontalExtent(); // update horizontal scroll bar m_vTree->Item[0]->Selected = VARIANT_TRUE; m_vTree->Items->Current = 0; CopyImageFromCurrentItem(); // Connect the tree control to the print preview control m_vPrintPreview1->ContentProvider = m_vTree->hWnd; ShowWindow(SW_MAXIMIZE); return TRUE; // return TRUE unless you set the focus to a control } void CSftPrintPreviewDlg::OnSize(UINT nType, int cx, int cy)
See Also SftPrintPreview Object | Object Hierarchy