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
Forces the repositioning of all preview pages and clearing of any cached information.
VB.NET | object.Restart(ByVal Style As SftPrintPreviewRestartConstants) |
VB | object.Restart(ByVal Style As SftPrintPreviewRestartConstants) |
C#.NET | void object.Restart(SftPrintPreviewRestartConstants Style); |
VC++ | HRESULT object->Restart(enum SftPrintPreviewRestartConstants Style); |
C | HRESULT object->raw_Restart(enum SftPrintPreviewRestartConstants Style); |
object
Style
Defines the type of repositioning and clearing of cached information.
Name | Value | Description |
---|---|---|
restartSftPrintPreviewComplete | 0 | Complete - Repositions all pages, all pages are invalid and clears all cached information. |
restartSftPrintPreviewTop | 1 | Top - Repositions all pages and displays the first page. |
restartSftPrintPreviewBottom | 2 | Bottom - Repositions all pages and displays the last page. |
restartSftPrintPreviewCurrentPage | 3 | Current Page - The current page is invalid and clears cached information for the current page. |
restartSftPrintPreviewAllPages | 4 | All Pages - All pages are invalid and clears all cached information. |
The Restart method forces the repositioning of all preview pages and clearing of any cached information.
This method is typically used if printer attributes or page formatting change, which requires all pages to be reformatted.
' Hide the RichEdit control RichTextBox1.Enabled = False RichTextBox1.Visible = False ' Show the print preview control SftPrintPreview1.Enabled = True SftPrintPreview1.Visible = True SftPrintPreview1.SetFocus ' In case the tree control changed, we have to reformat everything SftPrintPreview1.Restart restartSftPrintPreviewComplete End Sub Private Sub ViewRichEdit_Click() ' Hide the print preview control SftPrintPreview1.Enabled = False SftPrintPreview1.Visible = False ' Show the RichEdit control
richTextBox1.Enabled = false; // Show the print preview control axSftPrintPreview1.Enabled = true; axSftPrintPreview1.Visible = true; axSftPrintPreview1.Focus(); axSftPrintPreview1.Width = this.Width; axSftPrintPreview1.Height = this.Height; // In case the richedit control changed, we have to reformat everything axSftPrintPreview1.Restart(SftPrintPreviewRestartConstants.restartSftPrintPreviewComplete); } private void axSftPrintPreview1_PageSetupWanted(object sender, System.EventArgs e) { axSftPrintPreview1.PageSetup(0); }
ASSERT(m_vPrintPreview1 != NULL); // Load contents m_Edit.LimitText(0x7fffffff);//need all the space we can get LoadEditControlWithFile(CString(_T("..\\SftPrintPreview.rtf"))); // Connect the richedit control to the print preview control m_vPrintPreview1->ContentProviderCallback((long) m_Edit.m_hWnd, m_vPrintPreview1->RenderRichEdit, NULL); m_vPrintPreview1->Restart(restartSftPrintPreviewComplete); 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