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.

155 lines
2.4 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1995 - 1998
  3. All rights reserved.
  4. Module Name:
  5. help.cxx
  6. Abstract:
  7. Print UI help facailities
  8. Author:
  9. Steve Kiraly (SteveKi) 11/19/95
  10. Revision History:
  11. --*/
  12. #include "precomp.hxx"
  13. #pragma hdrstop
  14. #include "prhlpids.h"
  15. #include "help.hxx"
  16. /*++
  17. Routine Name:
  18. PrintUIHlep
  19. Routine Description:
  20. All dialogs and property sheets call this routine
  21. to handle help. It is important that control ID's
  22. are unique to this project for this to work.
  23. Arguments:
  24. UINT uMsg,
  25. HWND hDlg,
  26. WPARAM wParam,
  27. LPARAM lParam
  28. Return Value:
  29. TRUE if help message was dislayed, FALSE if message not handled,
  30. --*/
  31. BOOL
  32. PrintUIHelp(
  33. IN UINT uMsg,
  34. IN HWND hDlg,
  35. IN WPARAM wParam,
  36. IN LPARAM lParam
  37. )
  38. {
  39. BOOL bStatus = FALSE;
  40. switch( uMsg ){
  41. case WM_HELP:
  42. bStatus = WinHelp( (HWND)((LPHELPINFO)lParam)->hItemHandle,
  43. gszWindowsHlp,
  44. HELP_WM_HELP,
  45. (ULONG_PTR)g_aHelpIDs );
  46. break;
  47. case WM_CONTEXTMENU:
  48. bStatus = WinHelp( (HWND)wParam,
  49. gszWindowsHlp,
  50. HELP_CONTEXTMENU,
  51. (ULONG_PTR)g_aHelpIDs );
  52. break;
  53. }
  54. return bStatus;
  55. }
  56. /*++
  57. Routine Name:
  58. PrintUICloseHelp
  59. Routine Description:
  60. Close the help file system. This should be done when the last
  61. printer queue view is closed.
  62. Arguments:
  63. UINT uMsg,
  64. HWND hDlg,
  65. WPARAM wParam,
  66. LPARAM lParam
  67. Return Value:
  68. TRUE if help system was closed, otherwise FALSE.
  69. --*/
  70. BOOL
  71. PrintUICloseHelp(
  72. IN UINT uMsg,
  73. IN HWND hDlg,
  74. IN WPARAM wParam,
  75. IN LPARAM lParam
  76. )
  77. {
  78. //
  79. // Close down the help system.
  80. //
  81. return WinHelp( hDlg, gszWindowsHlp, HELP_QUIT, NULL );
  82. }
  83. /*++
  84. Routine Name:
  85. PrintUIHtmlHelp
  86. Routine Description:
  87. Call to HtmlHelp
  88. Arguments:
  89. UINT uMsg,
  90. HWND hDlg,
  91. WPARAM wParam,
  92. LPARAM lParam
  93. Return Value:
  94. Windows handle if help succeded.
  95. --*/
  96. HWND
  97. PrintUIHtmlHelp(
  98. IN HWND hwndCaller,
  99. IN LPCTSTR pszFile,
  100. IN UINT uCommand,
  101. IN ULONG_PTR dwData
  102. )
  103. {
  104. return HtmlHelp( hwndCaller, pszFile, uCommand, dwData );
  105. }