Feature: add client log dialog with auto-refresh, icon and menu bitmap

- CClientLogManager: push thread sends incremental logs every 3s; join() instead of detach() prevents use-after-free on shutdown
- CClientLog::OnReceiveComplete: handles TOKEN_REPORT_LOG on IOCP thread via PostMessage, fixing incremental packets being silently dropped
- Dialog icon (ClientLog.ico) and menu bitmap (ClientLog.bmp) added; OnInitDialog loads icon; IDR_MENU_LIST_ONLINE "运行日志" item gets the bitmap

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
yuanyuanxiang
2026-07-13 19:02:25 +02:00
parent 85a5774a0f
commit 23c9a4f242
22 changed files with 331 additions and 5 deletions

View File

@@ -0,0 +1,31 @@
#pragma once
#include "afxcmn.h"
#include "IOCPServer.h"
class CClientLog : public CDialogBase
{
DECLARE_DYNAMIC(CClientLog)
public:
CClientLog(CWnd* pParent, Server* pServer, CONTEXT_OBJECT* pContext);
virtual ~CClientLog();
virtual void OnReceiveComplete();
void AppendLog(const std::string& text);
protected:
virtual BOOL OnInitDialog();
virtual void DoDataExchange(CDataExchange* pDX);
afx_msg void OnDestroy();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg LRESULT OnReportLog(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
private:
CEdit m_editLog;
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_DIALOG_CLIENT_LOG };
#endif
};