Leaked source code of windows server 2003
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.

78 lines
2.7 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : resutil.h //
  3. // //
  4. // DESCRIPTION : resource utility functions for MMC use. //
  5. // //
  6. // AUTHOR : zvib //
  7. // //
  8. // HISTORY : //
  9. // Jun 30 1998 zvib Init. //
  10. // Jul 12 1998 adik Add NEMMCUTIL_EXPORTED //
  11. // Jul 23 1998 adik Include DefineExported.h //
  12. // Aug 24 1998 adik Add methods to save and load. //
  13. // Aug 31 1998 adik Add OnSnapinHelp. //
  14. // Mar 28 1999 adik Redefine CColumnsInfo. //
  15. // Apr 27 1999 adik Help support. //
  16. // //
  17. // Oct 14 1999 yossg Welcome to Fax //
  18. // //
  19. // Copyright (C) 1998 Microsoft Corporation All Rights Reserved //
  20. /////////////////////////////////////////////////////////////////////////////
  21. #ifndef __RESUTIL_H_
  22. #define __RESUTIL_H_
  23. #include <mmc.h>
  24. #define LAST_IDS 0
  25. struct ColumnsInfoInitData
  26. {
  27. //
  28. // String id in the resource, or LAST_IDS.
  29. //
  30. int ids;
  31. //
  32. // Column width, can be HIDE_COLUMN, AUTO_WIDTH or
  33. // specifies the width of the column in pixels.
  34. //
  35. int Width;
  36. };
  37. class CColumnsInfo
  38. {
  39. public:
  40. CColumnsInfo();
  41. ~CColumnsInfo();
  42. //
  43. // Set the columns in the result pane
  44. //
  45. HRESULT InsertColumnsIntoMMC(IHeaderCtrl *pHeaderCtrl,
  46. HINSTANCE hInst,
  47. ColumnsInfoInitData aInitData[]);
  48. private:
  49. //
  50. // Init the class with specific columns data
  51. //
  52. HRESULT Init(HINSTANCE hInst, ColumnsInfoInitData aInitData[]);
  53. //
  54. // Keep columns info
  55. //
  56. struct ColumnData { int Width; BSTR Header; };
  57. CSimpleArray<ColumnData> m_Data;
  58. //
  59. // One time initialization flag
  60. //
  61. BOOL m_IsInitialized;
  62. };
  63. WCHAR * __cdecl GetHelpFile();
  64. HRESULT __cdecl OnSnapinHelp(IConsole *pConsole);
  65. #endif // __RESUTIL_H_