Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation 1996-2001.
  5. //
  6. // File: helpdlg.cpp
  7. //
  8. // Contents: implementation of CHelpDialog
  9. //
  10. //----------------------------------------------------------------------------
  11. #include "StdAfx.h"
  12. #include "HelpDlg.h"
  13. #include "util.h"
  14. #ifdef _DEBUG
  15. #define new DEBUG_NEW
  16. #undef THIS_FILE
  17. static char THIS_FILE[] = __FILE__;
  18. #endif
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CHelpDialog message handlers
  21. BEGIN_MESSAGE_MAP(CHelpDialog, CDialog)
  22. //{{AFX_MSG_MAP(CHelpDialog)
  23. //}}AFX_MSG_MAP
  24. ON_MESSAGE(WM_HELP, OnHelp)
  25. END_MESSAGE_MAP()
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CHelpDialog member functions
  28. afx_msg
  29. BOOL
  30. CHelpDialog::OnHelp(WPARAM wParam, LPARAM lParam)
  31. {
  32. const LPHELPINFO pHelpInfo = (LPHELPINFO)lParam;
  33. if (pHelpInfo && pHelpInfo->iContextType == HELPINFO_WINDOW)
  34. {
  35. // Display context help for a control
  36. if (!::WinHelp(
  37. (HWND)pHelpInfo->hItemHandle,
  38. GetSeceditHelpFilename(),
  39. HELP_WM_HELP,
  40. (DWORD_PTR)m_pHelpIDs))
  41. {
  42. ;
  43. }
  44. }
  45. return TRUE;
  46. }