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 CheckMarginsPrintableExternal function returns whether the specified margins are within the printer's printable area.
C
BOOL SftPrintPreview_CheckMarginsPrintableExternal(SFTPRINTPREVIEW_PRINTERRESULT * Prt, BOOL fMsg, BOOL* fUpdated, double* Left, double* Top, double* Right, double* Bottom, double* HeaderDist, double* FooterDist);
C++
static BOOL CSftPrintPreview::CheckMarginsPrintableExternal(SFTPRINTPREVIEW_PRINTERRESULT * lpPrt, BOOL fMsg, BOOL* fUpdated, double* Left, double* Top, double* Right, double* Bottom, double* HeaderDist, double* FooterDist);
Prt
The printer definitions.
fMsg
Set to TRUE to display a suitable error message if the specified margins are invalid, FALSE otherwise. The error message is localized based on the supplied resources (see National Language Support).
fUpdated
Returns non-zero if any of the margin values has been updated, because it was invalid, otherwise 0 is returned. The actual value return depends on the invalid argument (1=Top, 2=Bottom, 3=Left, 4=Right, 5=HeaderDist, 6=FooterDist).
Left, Top, Right, Bottom, HeaderDist, FooterDist
On entry, specifies the margins requested. On return, the values are adjusted if outside of the printable area, along with a suitable error message (based on fMsg) and feedback (fUpdated).
The return value is TRUE if all margin values are within the printable area, FALSE otherwise.
The CheckMarginsPrintableExternal function returns whether the specified margins are within the printer's printable area.
The CheckMarginsPrintable function is identical to the CheckMarginsPrintableExternal function, but doesn't require a SftPrintPreview control to be active. This allows an application to manipulate the current/selected printer margins before the first SftPrintPreview control is created.
C
SFTPRINTPREVIEW_PRINTERRESULT Prt; BOOL fDefault; memset(&Prt, 0, sizeof(Prt)); if (SftPrintPreview_PrintSetupExternal(&Prt, &fDefault, hwndMain)) { BOOL fUpdated; double left = 0.1, right = 0.1, top = 0.1, bottom = 0.1, hdr = 0.1, footer = 0.1; if (SftPrintPreview_CheckMarginsPrintableExternal(&Prt, TRUE, &fUpdated, &left, &right, &top, &bottom, &hdr, &footer)) ; // Margins are OK }
C++
SFTPRINTPREVIEW_PRINTERRESULT Prt; BOOL fDefault; memset(&Prt, 0, sizeof(Prt)); if (CSftPrintPreview::PrintSetupExternal(Prt, fDefault, NULL)) { BOOL fUpdated; double left = 0.1, right = 0.1, top = 0.1, bottom = 0.1, hdr = 0.1, footer = 0.1; if (CSftPrintPreview::CheckMarginsPrintableExternal(&Prt, TRUE, &fUpdated, &left, &right, &top, &bottom, &hdr, &footer)) ; // Margins are OK }
See Also C/C++ API | C++ Classes | Notifications