📄 msgserverdlg.h
字号:
// MsgServerDlg.h : header file
//
#if !defined(AFX_MSGSERVERDLG_H__F46F80C0_B6CC_43C5_8FF1_5EBE447B622F__INCLUDED_)
#define AFX_MSGSERVERDLG_H__F46F80C0_B6CC_43C5_8FF1_5EBE447B622F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CMsgServerDlg dialog
struct MsgInfo
{
CTime ctAddTime;
int iMsgSize;
char strMsg[400];
};
struct SentInfo
{
int iCurrentMsgCount;
MsgInfo MsgList[10];
};
class CListenSocket;
class CMsgServerDlg : public CDialog
{
// Construction
public:
// MsgInfo MsgList[10];
int iCurrentMsgCount;
int iNo;
int iDataSize;
SentInfo *SendBuffer;
CListenSocket *m_pListenSocket;//控制了一个监听Socket
// CSendSocket *m_pSendSocket;
CPtrList m_pAcceptList;//控制了一个队列的接收Socket
public:
void AddMsgToList( CString strMsg );
void OnIniSock();
int MemorySize( SentInfo *Buffer);
void OnHide();
int DeleteIcon();
void WriteDataToFile( CString strMsg );
public:
CMsgServerDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMsgServerDlg)
enum { IDD = IDD_MSGSERVER_DIALOG };
CListCtrl m_ListMsg;
CString m_strAddMsg;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMsgServerDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
protected:
LRESULT OnTray(WPARAM wParam,LPARAM lParam);
LRESULT OnHotKey(WPARAM wParam,LPARAM lParam);
// Generated message map functions
//{{AFX_MSG(CMsgServerDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnAddMsg();
afx_msg void OnClearMsg();
afx_msg void OnDblclkListMsg(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnTaskOpen();
afx_msg void OnTaskQuit();
afx_msg void OnDestroy();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MSGSERVERDLG_H__F46F80C0_B6CC_43C5_8FF1_5EBE447B622F__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -