LAPTOP-SNT8I5JK\Boounion
2025-09-08 a056810ab4c5fa63777f6fdddfeb190bbd9a6f54
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once
#include "LogEdit.h"
#include "BlButton.h"
#include <vector>
#include <string>
 
 
#define ID_MSG_LOGDLG_HIDE        WM_USER + 1023
 
 
enum class FilterMode {
    Include,  // Ö»±£ÁôÆ¥ÅäÐÐ
    Exclude   // ÅųýÆ¥ÅäÐÐ
};
 
// CPageLog ¶Ô»°¿ò
 
class CPageLog : public CDialogEx
{
    DECLARE_DYNAMIC(CPageLog)
 
public:
    CPageLog(CWnd* pParent = NULL);   // ±ê×¼¹¹Ô캯Êý
    virtual ~CPageLog();
 
 
private:
    void InitRxWindow();
    void AppendLog(int level, const char* pszText);
    void Resize();
 
 
private:
    COLORREF m_crBkgnd;
    HBRUSH m_hbrBkgnd;
    IObserver* m_pObserver;
    int m_nLevel;
    CString m_strFilterText;
    BOOL m_bRegex;
    std::vector<std::string> m_customIncludeTexts;
 
private:
    CBlButton m_btnLevel;
    CBlButton m_btnInclude;
    CLogEdit m_logEdit;
    FilterMode m_filterMode;
 
 
// ¶Ô»°¿òÊý¾Ý
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_DIALOG_LOG };
#endif
 
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV Ö§³Ö
 
    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
    afx_msg void OnSize(UINT nType, int cx, int cy);
    afx_msg void OnDestroy();
    afx_msg void OnClose();
    afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
    virtual BOOL PreTranslateMessage(MSG* pMsg);
    afx_msg void OnButtonLevelMenuClicked(NMHDR* pNMHDR, LRESULT* pResult);
    afx_msg void OnButtonIncludeMenuClicked(NMHDR* pNMHDR, LRESULT* pResult);
    afx_msg void OnEnChangeEditInclude();
    afx_msg void OnBnClickedCheckRegex();
};