📄 chessgatedlg.h
字号:
// ChessGateDlg.h : header file
//
#if !defined(AFX_CHESSGATEDLG_H__4DA303C5_6A16_42F4_A535_51F5A9D7D7EA__INCLUDED_)
#define AFX_CHESSGATEDLG_H__4DA303C5_6A16_42F4_A535_51F5A9D7D7EA__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "stdafx.h"
#include "ListBoxExt.h"
#define MAXSHOWLINES 2000 //监视窗口最大显示行数
#define WM_ACTIVETEST WM_USER+246 //心跳信号事件
UINT SendThreadFunc(LPVOID pParam); //发送线程
UINT RecvThreadFunc(LPVOID pParam); //接收线程
class CSocketListen;
/////////////////////////////////////////////////////////////////////////////
// CChessGateDlg dialog
class CChessGateDlg : public CDialog
{
private:
CWinThread *pSendThread; //
HWND m_hStatusWindow;
UINT m_nRequestCount;
CCriticalSection loglock; //写日日志临界段对象
char LogFile[50];
public:
CShareMemory<NODE_STRUCT> *login_recv_queue; //登录模块接收队列
CShareMemory<NODE_STRUCT> *login_send_queue; //发送队列
CShareMemory<NODE_STRUCT> *gobang_recv_queue; //五子棋模块接收队列
CCriticalSection cts_SocketQueue[QUEUE_NUM]; //SocketQueue临界段对象
CSocketListen *pSocketlisten[QUEUE_NUM];
// SocketQueue sktQueue[QUEUE_NUM][600]; //存放socket队列
// Construction
public:
void RefreshStatusBar();
CChessGateDlg(CWnd* pParent = NULL); // standard constructor
~CChessGateDlg();
BOOL WriteLog(LPCTSTR fmt,...);
void AddMsg(LPCTSTR fmt , ...);
// Dialog Data
//{{AFX_DATA(CChessGateDlg)
enum { IDD = IDD_CHESSGATE_DIALOG };
CListBoxExt m_lstMonitor;
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChessGateDlg)
protected:
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CChessGateDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
virtual void OnCancel();
afx_msg void OnClose();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnMenuitemAbout();
afx_msg void OnMenuitemExit();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHESSGATEDLG_H__4DA303C5_6A16_42F4_A535_51F5A9D7D7EA__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -