- 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>
32 lines
705 B
C++
32 lines
705 B
C++
#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
|
|
};
|