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.

105 lines
2.7 KiB

  1. //============================================================================
  2. // Copyright (C) Microsoft Corporation, 1997 - 1999
  3. //
  4. // File: basecon.h
  5. //
  6. // History:
  7. // 07/22/97 Kenn M. Takara Created.
  8. //
  9. // Basic interface container functionality. One of the functions of
  10. // this basic container class is to provide column support.
  11. //
  12. //============================================================================
  13. #ifndef _BASECON_H
  14. #define _BASECON_H
  15. #ifndef _BASEHAND_H
  16. #include "basehand.h"
  17. #endif
  18. #ifndef _HANDLERS_H
  19. #include "handlers.h"
  20. #endif
  21. #ifndef _XSTREAM_H
  22. #include "xstream.h" // need for ColumnData
  23. #endif
  24. #ifndef _RTRLIB_H
  25. #include "rtrlib.h" // ContainerColumnInfo
  26. #endif
  27. #ifndef _BASERTR_H
  28. #include "basertr.h" // BaseRouterHandler
  29. #endif
  30. #include "resource.h"
  31. // forward declarations
  32. struct ContainerColumnInfo;
  33. /*---------------------------------------------------------------------------
  34. Class: BaseContainerHandler
  35. The purpose for this class is to provide support common to all
  36. containers in the router snapins.
  37. - One feature is the ability to provide column remapping. This
  38. also supports the saving/loading of column data.
  39. ---------------------------------------------------------------------------*/
  40. // Valid UserResultNotify params
  41. // This is called when it is time to save.
  42. #define RRAS_ON_SAVE 500
  43. HRESULT HrDisplayHelp(ITFSComponent *, LPCTSTR, UINT);
  44. HRESULT HrDisplayHelp(ITFSComponent *, LPCTSTR, LPCTSTR);
  45. class BaseContainerHandler :
  46. public BaseRouterHandler
  47. {
  48. public:
  49. BaseContainerHandler(ITFSComponentData *pCompData, ULONG ulColumnId,
  50. const ContainerColumnInfo *prgColumnInfo)
  51. : BaseRouterHandler(pCompData),
  52. m_ulColumnId(ulColumnId),
  53. m_prgColumnInfo(prgColumnInfo),
  54. m_nHelpTopicId(IDS_DEFAULT_HELP_TOPIC),
  55. m_nTaskPadDisplayNameId(IDS_DEFAULT_TASKPAD_DISPLAY_TITLE)
  56. {};
  57. // Override the column click so that we can get notifications
  58. // about changes to the sort order
  59. OVERRIDE_BaseResultHandlerNotify_OnResultColumnClick();
  60. OVERRIDE_BaseResultHandlerNotify_OnResultContextHelp();
  61. OVERRIDE_ResultHandler_UserResultNotify();
  62. OVERRIDE_ResultHandler_TaskPadNotify();
  63. OVERRIDE_ResultHandler_TaskPadGetTitle();
  64. //OVERRIDE_ResultHandler_EnumTasks();
  65. // Override LoadColumns/SaveColumns so that we can persist our data
  66. HRESULT LoadColumns(ITFSComponent *, MMC_COOKIE, LPARAM, LPARAM);
  67. HRESULT SaveColumns(ITFSComponent *, MMC_COOKIE, LPARAM, LPARAM);
  68. HRESULT SortColumns(ITFSComponent *);
  69. protected:
  70. HRESULT PrivateLoadColumns(ITFSComponent * pComponent,
  71. IHeaderCtrl * pHeaderCtrl,
  72. MMC_COOKIE cookie);
  73. ULONG m_ulColumnId;
  74. const ContainerColumnInfo * m_prgColumnInfo;
  75. UINT m_nHelpTopicId;
  76. UINT m_nTaskPadDisplayNameId;
  77. };
  78. #endif _BASECON_H