#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);
|
};
|