| 81 | public: |
| 82 | explicit CEditLog(CWnd *pEdit) : m_pEdit(static_cast<CEdit *>(pEdit)) { } |
| 83 | void WriteLog(std::string_view text) override { // // // |
| 84 | int Len = m_pEdit->GetWindowTextLengthW(); |
| 85 | m_pEdit->SetSel(Len, Len, 0); |
| 86 | m_pEdit->ReplaceSel(conv::to_wide(text).data(), 0); |
| 87 | m_pEdit->RedrawWindow(); |
| 88 | } |
| 89 | void Clear() override { |
| 90 | m_pEdit->SetWindowTextW(L""); |
| 91 | m_pEdit->RedrawWindow(); |