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 CheckMarginsPrintable function returns whether the specified margins are within the printer's printable area.
C
BOOL WINAPI SftPrintPreview_CheckMarginsPrintable(HWND hwndCtl, BOOL fMsg, BOOL* fUpdated, double* Left, double* Top, double* Right, double* Bottom, double* HeaderDist, double* FooterDist);
C++
BOOL CSftPrintPreview::CheckMarginsPrintable(BOOL fMsg, BOOL* fUpdated, double* Left, double* Top, double* Right, double* Bottom, double* HeaderDist, double* FooterDist) const;
hwndCtl
The window handle of the Print Preview control.
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 CheckMarginsPrintable 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
BOOL fUpdated; double left = 0.1, right = 0.1, top = 0.1, bottom = 0.1, hdr = 0.1, footer = 0.1; if (SftPrintPreview_CheckMarginsPrintable(m_hwndPreview, TRUE, &fUpdated, &left, &right, &top, &bottom, &hdr, &footer)) ; // Margins are OK
C++
BOOL fUpdated; double left = 0.1, right = 0.1, top = 0.1, bottom = 0.1, hdr = 0.1, footer = 0.1; if (CSftPrintPreview::CheckMarginsPrintable(TRUE, &fUpdated, &left, &right, &top, &bottom, &hdr, &footer)) ; // Margins are OK
See Also C/C++ API | C++ Classes | Notifications