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.

63 lines
1.7 KiB

  1. //****************************************************************************
  2. //
  3. // Module: LIGHTS.EXE
  4. // File: help.c
  5. // Content: This file contains the context-sensitive help routine/data.
  6. // History:
  7. // Sun 03-Jul-1994 15:22:54 -by- Viroon Touranachun [viroont]
  8. //
  9. // Copyright (c) Microsoft Corporation 1991-1994
  10. //
  11. //****************************************************************************
  12. #include "lights.h"
  13. #include <help.h>
  14. //****************************************************************************
  15. // Context-sentive help/control mapping arrays
  16. //****************************************************************************
  17. char gszHelpFile[] = "windows.hlp"; // help filename
  18. // Modem light dialog
  19. //
  20. DWORD gaLights[] = {
  21. IDC_MODEM_FRAME, IDH_LIGHTS,
  22. IDC_MODEMTIMESTRING, IDH_LIGHTS,
  23. IDC_MODEM_TX_FRAME, IDH_LIGHTS,
  24. IDC_MODEM_RX_FRAME, IDH_LIGHTS,
  25. 0, 0};
  26. /****************************************************************************
  27. * @doc INTERNAL
  28. *
  29. * @func void NEAR PASCAL | ContextHelp | This function handles the context
  30. * sensitive help user interaction.
  31. *
  32. * @rdesc Returns none
  33. *
  34. ****************************************************************************/
  35. void NEAR PASCAL ContextHelp (LPDWORD aHelp, UINT uMsg,
  36. WPARAM wParam,LPARAM lParam)
  37. {
  38. HWND hwnd;
  39. UINT uType;
  40. // Determine the help type
  41. //
  42. if (uMsg == WM_HELP)
  43. {
  44. hwnd = ((LPHELPINFO)lParam)->hItemHandle;
  45. uType = HELP_WM_HELP;
  46. }
  47. else
  48. {
  49. hwnd = (HWND)wParam;
  50. uType = HELP_CONTEXTMENU;
  51. };
  52. // Let Help take care of it
  53. //
  54. WinHelp(hwnd, gszHelpFile, uType, (DWORD)aHelp);
  55. }