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.

78 lines
1.9 KiB

  1. #if !defined(AFX_LOGVIEWER_H__4F84A510_9B65_4A6D_A02D_7493977E56B7__INCLUDED_)
  2. #define AFX_LOGVIEWER_H__4F84A510_9B65_4A6D_A02D_7493977E56B7__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // LogViewer.h : header file
  7. //
  8. typedef struct _PROGCTRL_SETUP_INFO {
  9. int iMaxRange;
  10. int iMinRange;
  11. int iStepValue;
  12. }PROGCTRL_SETUP_INFO;
  13. class CProgCtrl
  14. {
  15. public:
  16. CProgCtrl();
  17. ~CProgCtrl();
  18. void SetControl(CProgressCtrl *pProgressCtrl);
  19. void SetupProgressCtrl(PROGCTRL_SETUP_INFO *pSetupInfo);
  20. void StepIt();
  21. void DestroyME();
  22. int m_MaxRange;
  23. BOOL bCancel;
  24. private:
  25. CProgressCtrl *m_pProgressCtrl;
  26. CStatic *m_pStaticText;
  27. };
  28. /////////////////////////////////////////////////////////////////////////////
  29. // CLogViewer dialog
  30. class CLogViewer : public CDialog
  31. {
  32. // Construction
  33. public:
  34. void ColorizeText(BOOL bColorize);
  35. CProgCtrl *m_pProgDlg;
  36. void SetProgressCtrl(CProgCtrl *pProgCtrl);
  37. void ParseLogToColor();
  38. void ColorLine(int LineNumber, COLORREF rgbColor);
  39. void ColorLine(int iStartSel, int iEndSel, COLORREF rgbColor);
  40. BOOL m_bKillInitialSelection;
  41. BOOL m_bColorizeLog;
  42. CLogViewer(CWnd* pParent = NULL); // standard constructor
  43. // Dialog Data
  44. //{{AFX_DATA(CLogViewer)
  45. enum { IDD = IDD_VIEW_LOG_DIALOG };
  46. CRichEditCtrl m_LogViewer;
  47. //}}AFX_DATA
  48. // Overrides
  49. // ClassWizard generated virtual function overrides
  50. //{{AFX_VIRTUAL(CLogViewer)
  51. protected:
  52. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  53. //}}AFX_VIRTUAL
  54. // Implementation
  55. protected:
  56. // Generated message map functions
  57. //{{AFX_MSG(CLogViewer)
  58. virtual BOOL OnInitDialog();
  59. afx_msg void OnSize(UINT nType, int cx, int cy);
  60. afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
  61. //}}AFX_MSG
  62. DECLARE_MESSAGE_MAP()
  63. };
  64. //{{AFX_INSERT_LOCATION}}
  65. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  66. #endif // !defined(AFX_LOGVIEWER_H__4F84A510_9B65_4A6D_A02D_7493977E56B7__INCLUDED_)