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 type of the callback routine used to render data for previewing or printing.
typedef BOOL (CALLBACK* SFTPRINTPREVIEW_DRAWINFOPROC)(LPSFTPRINTPREVIEW_DRAWINFO lpInfo);
lpInfo
A pointer to a SFTPRINTPREVIEW_DRAWINFO structure defining the type of call and the action required by the window.
Return TRUE if the call was successful, FALSE otherwise. The interpretation of the return value by SftPrintPreview/DLL depends on the actual function expected to be performed by the callback routine (see SFTPRINTPREVIEW_DRAWINFO, function member).
Defines the type of the callback routine used to render data for previewing or printing.
SftPrintPreview/DLL can be used to preview and print the contents of any window (including custom controls), as long as these windows implement the required support for SftPrintPreview/DLL.
When setting the SFTPRINTPREVIEW_CONTROL member hwndContent, SftPrintPreview/DLL sends a SFTPRINTPREVIEW_CONTENTWINDOWMESSAGE message to the specified window to determine whether it supports the SFTPRINTPREVIEW_DRAWINFOPROC callback.
C
UINT contentMessage; ... contentMessage = RegisterWindowMessage(TEXT(SFTPRINTPREVIEW_CONTENTWINDOWMESSAGE); ... LRESULT CALLBACK SftTree_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { // Standard Windows Messages .... } if (pData->contentMessage != 0 && msg == pData->contentMessage) { LPSFTPRINTPREVIEW_CALLBACKINFO lpCB = (LPSFTPRINTPREVIEW_CALLBACKINFO) lParam; lpCB->lpDrawInfoProc = SftTree_PrintCallback; lpCB->lpDrawPageWorkArea = (SFTPRINTPREVIEW_DWORD_PTR) pData; return 1L; } return DefWindowProc(hwnd, msg, wParam, lParam); }
BOOL CALLBACK SftTree_PrintCallback(LPSFTPRINTPREVIEW_DRAWINFO lpInfo) { register PWINDATA pData = (PWINDATA) lpInfo->lpDrawPageWorkArea; switch (lpInfo->function) { default: case SFTPRINTPREVIEW_PRINT_INIT: return TRUE; case SFTPRINTPREVIEW_PRINT_TERM: return TRUE; case SFTPRINTPREVIEW_PRINT_CLEARCACHE: return TRUE; case SFTPRINTPREVIEW_PRINT_DIMENSIONS: lpInfo->contentWidth = lpInfo->maxContentWidth; lpInfo->iContentSizing = SFTPRINTPREVIEW_CONTENTSIZING_FIT; return TRUE; case SFTPRINTPREVIEW_PRINT_ONEPAGE: PrintOnePage(pData, lpInfo); return TRUE; } }
See Also C/C++ API | C++ Classes | Notifications