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 NM_SFTPRINTPREVIEW_CLOSE_CODE notification code is sent when the users requests to close the Print Preview control window.
NM_SFTPRINTPREVIEW_CLOSE* pNtfy = (NM_SFTPRINTPREVIEW_CLOSE*) lParam;
wParam
Contains the Print Preview control's control identifier.
lParam
Pointer to an NM_SFTPRINTPREVIEW_CLOSE structure that contains information specific to this notification. The structure also contains a standard NMHDR structure, which has additional information about the control sending this notification.
The return value is ignored.
The NM_SFTPRINTPREVIEW_CLOSE_CODE notification code is sent when the users requests to close the Print Preview control window. The user can close the Print Preview control window using the Escape key or by clicking the Close button on the built-in tool bar.
If the NM_SFTPRINTPREVIEW_CLOSE_CODE notification is not handled by an application, the Print Preview control window will not close automatically (unless the window is destroyed using a Windows API function such as DestroyWindow or its parent window is destroyed).
Applications using C++/MFC and the CSftPrintPreview_View class do not need to handle this notification as it is automatically handled by the CSftPrintPreview_View class.
The parent window of the Print Preview control receives the NM_SFTPRINTPREVIEW_CLOSE_CODE notification code through the WM_NOTIFY message.
C
LRESULT CALLBACK MainWindowProc(HWND hwndMain, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_NOTIFY: { int id = (int) wParam; LPNMHDR pnmh = (LPNMHDR) lParam; switch (id) { case IDC_PREVIEW: switch (pnmh->code) { case NM_SFTPRINTPREVIEW_CLOSE_CODE: { // user wants to close NM_SFTPRINTPREVIEW_CLOSE* pNtfy = (NM_SFTPRINTPREVIEW_CLOSE*) lParam; SendMessage(hwndMain, WM_CLOSE, 0, 0); break; } } break; } break; } } return DefWindowProc(hwndMain, uMsg, wParam, lParam); }
C++
afx_msg void OnPreviewClose(NMHDR* pnmh, LRESULT* result); BEGIN_MESSAGE_MAP(CPreviewDialog, CDialog) ON_NM_SFTPRINTPREVIEW_CLOSE_CODE(IDC_PREVIEW, OnPreviewClose) END_MESSAGE_MAP() afx_msg void CPreviewDialog::OnPreviewClose(NMHDR* pnmh, LRESULT* result) { NM_SFTPRINTPREVIEW_CLOSE* pNotifyStruct = (NM_SFTPRINTPREVIEW_CLOSE*) pnmh; SendMessage(WM_COMMAND, IDCANCEL); }
See Also C/C++ API | C++ Classes | Notifications