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.

77 lines
1.7 KiB

  1. #ifndef _lcsource_h
  2. #define _lcsource_h
  3. #define CX_DEFAULT_DESCRIPTION_WIDTH 100
  4. #define CX_DESCRIPTION_SLOP 25
  5. /////////////////////////////////////////////////////////////////////////////
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CLcSource window
  8. class CXMessageArray;
  9. class CXEventSource;
  10. class CXMessage;
  11. class CLcSource : public CListCtrl
  12. {
  13. // Construction
  14. public:
  15. CLcSource();
  16. SCODE CreateWindowEpilogue();
  17. // Attributes
  18. public:
  19. // Operations
  20. public:
  21. BOOL Find(CString sText, BOOL bWholeWord, BOOL bMatchCase);
  22. SCODE SetEventSource(CXEventSource* pEventSource);
  23. void SortItems(DWORD dwColumn);
  24. LONG FindItem(DWORD dwMessageId);
  25. void RefreshItem(LONG iItem);
  26. CXMessage* operator[](LONG iItem) {return GetAt(iItem); }
  27. CXMessage* GetAt(LONG iItem);
  28. LONG GetSize() {return GetItemCount(); }
  29. void GetSelectedMessages(CXMessageArray& amsg);
  30. void NotifyTrappingChange(DWORD dwMessageId, BOOL bIsTrapping);
  31. LONG SetDescriptionWidth();
  32. // Overrides
  33. // ClassWizard generated virtual function overrides
  34. //{{AFX_VIRTUAL(CLcSource)
  35. //}}AFX_VIRTUAL
  36. // Implementation
  37. public:
  38. virtual ~CLcSource();
  39. // Generated message map functions
  40. protected:
  41. //{{AFX_MSG(CLcSource)
  42. //}}AFX_MSG
  43. DECLARE_MESSAGE_MAP()
  44. private:
  45. friend class CSource;
  46. CSource* m_pSource;
  47. void SetColumnHeadings();
  48. SCODE GetMessageLibPath(CString& sLog, CString& sEventSource, CString& sLibPath);
  49. void AddMessage(CXMessage* pMessage);
  50. void SetDescriptionWidth(CXMessageArray& aMessages);
  51. };
  52. enum {ICOL_LcSource_EVENTID = 0,
  53. ICOL_LcSource_SEVERITY,
  54. ICOL_LcSource_TRAPPING,
  55. ICOL_LcSource_DESCRIPTION,
  56. ICOL_LcSource_MAX
  57. };
  58. #endif //_lcsource_h