LAPTOP-SNT8I5JK\Boounion
2025-06-03 61b2bfa09588f08accb13e98ee4cd73015cb2352
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
#pragma once
#include <iostream>
#include <wrl.h>
#include <wil/com.h>
#include "WebView2.h"
#include "BlButton.h"
 
using namespace Microsoft::WRL;
 
 
// CTerminalDisplayDlg ¶Ô»°¿ò
 
class CTerminalDisplayDlg : public CDialogEx
{
    DECLARE_DYNAMIC(CTerminalDisplayDlg)
 
public:
    CTerminalDisplayDlg(CWnd* pParent = NULL);   // ±ê×¼¹¹Ô캯Êý
    virtual ~CTerminalDisplayDlg();
 
public:
    void SetTemplateHtml(const char* pszFilepath);
    void ShowText(const char* pszText, unsigned int duration = -1);
 
private:
    void Resize();
    void ProcessWebViewMessage(wil::unique_cotaskmem_string& message);
    void UpdateCloseBtn();
 
private:
    wil::com_ptr<ICoreWebView2Controller> m_webviewController;
    wil::com_ptr<ICoreWebView2> m_webWiew;
    std::string m_strFilepath;
    COLORREF m_crBkgnd;
    HBRUSH m_hbrBkgnd;
    CBlButton m_btnClose;
 
 
// ¶Ô»°¿òÊý¾Ý
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_DIALOG_TERMINAL_DISPLAY };
#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 int OnCreate(LPCREATESTRUCT lpCreateStruct);
    afx_msg void OnTimer(UINT_PTR nIDEvent);
    afx_msg void OnBnClickedButtonClose();
    afx_msg LRESULT OnNcHitTest(CPoint point);
};