|
|
|
|
|
NM_SFTPRINTPREVIEW_HELP |
The NM_SFTPRINTPREVIEW_HELP structure describes the NM_SFTPRINTPREVIEW_HELP_CODE notification.
typedef struct {
NMHDR hdr;
int helpType;
#define NM_SFTPRINTPREVIEW_HELP_TOOLBAR 1
#define NM_SFTPRINTPREVIEW_HELP_PAGESETUP 2
} NM_SFTPRINTPREVIEW_HELP;
Members
hdr
Standard NMHDR structure that contains information about this notification.
helpType
Defines how the user requested online help.
NM_SFTPRINTPREVIEW_HELP_TOOLBAR |
The user clicked the Help button of the built-in tool bar. |
NM_SFTPRINTPREVIEW_HELP_PAGESETUP |
The user clicked the Help button of the Print Setup dialog. |
Comments
The NM_SFTPRINTPREVIEW_HELP structure describes the NM_SFTPRINTPREVIEW_HELP_CODE notification.
The NM_SFTPRINTPREVIEW_HELP_CODE notification code is sent when the user requests online help.
General information about the control sending this notification is contained in the hdr structure (see NMHDR).
Example
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_HELP_CODE: { // help requested
NM_SFTPRINTPREVIEW_HELP* pNtfy = (NM_SFTPRINTPREVIEW_HELP*) lParam;
MessageBox(hwndMain, TEXT("Sorry, this sample application doesn't include online help."),
TEXT("SftPrintPreview/DLL"), MB_OK);
break;
}
}
break;
}
break;
}
}
return DefWindowProc(hwndMain, uMsg, wParam, lParam);
}
C++
BEGIN_MESSAGE_MAP(CPreviewPagePrinting, CSftPrintPreview_View)
ON_NM_SFTPRINTPREVIEW_HELP_CODE_REFLECT(OnNotifyHelpReflect)
END_MESSAGE_MAP()
afx_msg void CPreviewPagePrinting::OnNotifyHelpReflect(NMHDR * pNotifyStruct, LRESULT* lResult)
{
MessageBox(_T("Sorry, this sample application doesn't include online help."),
_T("SftPrintPreview/DLL"), MB_OK);
*lResult = 0;
}
See Also C/C++ API | C++ Classes | Notifications