#pragma once #include "BlButton.h" #include "LogEdit.h" #include #include // CPageLogcat 对话框 class CPageLogcat : public CDialogEx { DECLARE_DYNAMIC(CPageLogcat) public: CPageLogcat(CWnd* pParent = nullptr); // 标准构造函数 virtual ~CPageLogcat(); private: void InitRxWindow(); void AppendLog(int level, const char* pszText); private: COLORREF m_crBkgnd; HBRUSH m_hbrBkgnd; IObserver* m_pObserver; int m_nLevel; CString m_strIncludeText; BOOL m_bIncludeRegex; std::vector m_customIncludeTexts; private: CBlButton m_btnLevel; CBlButton m_btnInclude; CLogEdit m_logEdit; // 对话框数据 #ifdef AFX_DESIGN_TIME enum { IDD = IDD_PAGE_LOGCAT }; #endif protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 DECLARE_MESSAGE_MAP() public: virtual BOOL OnInitDialog(); afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); afx_msg void OnDestroy(); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnButtonLevelMenuClicked(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnButtonIncludeMenuClicked(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnEnChangeEditInclude(); afx_msg void OnBnClickedCheckRegex(); };