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
The SetControlInfo function defines the Print Preview control attributes.
C
BOOL SftPrintPreview_SetControlInfo(HWND hwnd, LPSFTPRINTPREVIEW_CONTROL lpCtl);
C++
BOOL CSftPrintPreview::SetControlInfo(LPSFTPRINTPREVIEW_CONTROL lpCtl);
hwnd
The window handle of the Print Preview control.
lpCtl
A pointer to a SFTPRINTPREVIEW_CONTROL structure defining the new Print Preview control attributes. The original contents should be retrieved using the GetControlInfo function.
The return value is TRUE if the function was successful, false otherwise.
The SetControlInfo function defines the Print Preview control attributes.
The GetControlInfo function retrieves the Print Preview control attributes. Some of the structure values returned can be modified and updated using the SetControlInfo function. See SFTPRINTPREVIEW_CONTROL for more information.
If the SetControlInfo function fails, the SFTPRINTPREVIEW_CONTROL structure's errorValue member contains an error code, indicating which structure member has caused the failure.
Error Code | Invalid SFTPRINTPREVIEW_CONTROL structure member |
---|---|
100 | marginX |
101 | marginY |
102 | zoom |
104 | fOwnDevHandles or any fields associated with fOwnDevHandles |
107 | offsetX |
108 | offsetY |
109 | numPageRows |
110 | numPageGroups |
111 | marginPageGroup |
112 | marginShadow |
113 | maxPageRows |
114 | maxPageGroups |
115 | zoomIncrDecr |
116 | fltLeftMargin |
117 | fltTopMargin |
118 | fltRightMargin |
119 | fltBottomMargin |
120 | fltHeaderFromEdge |
121 | fltFooterFromEdge |
122 | fltGutterMargin |
123 | iUnitsOfMeasure |
124 | iPrintPages |
125 | iContentSizing |
126 | iZoomStyle |
127 | hwndContent |
128 | hwndData |
C
SFTPRINTPREVIEW_CONTROL Ctl; Ctl.cbSize = sizeof(SFTPRINTPREVIEW_CONTROL); if (!SftPrintPreview_GetControlInfo(hwndCtl, &Ctl)) _ASSERT(0); // set all desired options Ctl.numPageRows = 1; // default to 1x2 pages Ctl.numPageGroups = 2; Ctl.zoom = 0; // start out with multiple pages lstrcpy(Ctl.szOutputName, TEXT("SftPrintPreview PreviewPages Sample Output")); lstrcpy(Ctl.szHeaderRight, TEXT("SftPrintPreview/DLL PreviewPages Sample")); lstrcpy(Ctl.szFooterLeft, TEXT("www.softelvdm.com")); if (!SftPrintPreview_SetControlInfo(hwndCtl, &Ctl)) { int errorValue = Ctl.errorValue; _ASSERT(0); // an error occurred, check errorValue for error code }
C++
SFTPRINTPREVIEW_CONTROL Ctl; Ctl.cbSize = sizeof(SFTPRINTPREVIEW_CONTROL); if (!m_Preview.GetControlInfo(&Ctl)) _ASSERT(0); // set all desired options Ctl.numPageRows = 1; // default to 1x2 pages Ctl.numPageGroups = 2; Ctl.zoom = 0; // start out with multiple pages lstrcpy(Ctl.szOutputName, TEXT("SftPrintPreview RichEdit Output")); lstrcpy(Ctl.szHeaderRight, TEXT("SftPrintPreview/DLL RichEdit Preview Sample")); lstrcpy(Ctl.szFooterLeft, TEXT("www.softelvdm.com")); if (!m_Preview.SetControlInfo(&Ctl)) { int errorValue = Ctl.errorValue; _ASSERT(0); // an error occurred, check errorValue for error code }
See Also C/C++ API | C++ Classes | Notifications