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.

91 lines
1.9 KiB

  1. #ifndef _lcevents_h
  2. #define _lcevents_h
  3. class CXEventLogArray;
  4. class CXMessageArray;
  5. class CXEventArray;
  6. class CXEvent;
  7. class CSource;
  8. class CLcEvents;
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CLcEvents window
  11. class CEvent;
  12. class CLcEvents : public CListCtrl
  13. {
  14. // Construction
  15. public:
  16. CLcEvents();
  17. SCODE CreateWindowEpilogue();
  18. // Attributes
  19. public:
  20. // Operations
  21. public:
  22. LONG GetSize() {return GetItemCount(); }
  23. CXEvent* GetAt(LONG iEvent);
  24. void RemoveAll();
  25. void RemoveAt(int nIndex, int nCount = 1);
  26. void AddEvents(CSource& source, CXEventArray& aEvents);
  27. void AddEvents(CSource& source, CXEventLogArray& aEventLogs);
  28. void DeleteSelectedEvents(CSource& source);
  29. void DeleteAt(LONG iEvent);
  30. BOOL HasSelection() {return GetNextItem(-1, LVNI_SELECTED) != -1; }
  31. void GetSelectedEvents(CXEventArray& aEvents);
  32. void RefreshEvents(CXEventArray& aEvents);
  33. void SetItem(LONG nItem, CXEvent* pEvent);
  34. LONG FindEvent(CXEvent* pEvent);
  35. void SortItems(DWORD dwColumn);
  36. void SelectEvents(CXEventArray& aEvents);
  37. // BOOL GetItem(LV_ITEM* pItem) const;
  38. // Overrides
  39. // ClassWizard generated virtual function overrides
  40. //{{AFX_VIRTUAL(CLcEvents)
  41. //}}AFX_VIRTUAL
  42. // Implementation
  43. public:
  44. virtual ~CLcEvents();
  45. // Generated message map functions
  46. protected:
  47. //{{AFX_MSG(CLcEvents)
  48. //}}AFX_MSG
  49. DECLARE_MESSAGE_MAP()
  50. private:
  51. void UpdateDescriptionWidth();
  52. LONG AddEvent(CXEvent* pEvent);
  53. void CreateEventsNotTrapped(CXMessageArray& amsg, CXEventArray& aevents);
  54. void SetColumnHeadings();
  55. DWORD m_dwSortColumn;
  56. LONG m_cxWidestMessage;
  57. };
  58. enum {ICOL_LcEvents_LOG = 0,
  59. ICOL_LcEvents_SOURCE,
  60. ICOL_LcEvents_ID,
  61. ICOL_LcEvents_SEVERITY,
  62. ICOL_LcEvents_COUNT,
  63. ICOL_LcEvents_TIME,
  64. ICOL_LcEvents_DESCRIPTION,
  65. ICOL_LcEvents_MAX
  66. };
  67. #endif //_lcevents_h
  68. /////////////////////////////////////////////////////////////////////////////