chatview.h

来自「一个用HLA编写的聊天程序」· C头文件 代码 · 共 88 行

H
88
字号
// ChatView.h : interface of the CChatView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CHATVIEW_H__0F520FDB_6B3B_460D_92B9_B34A61CB67C6__INCLUDED_)
#define AFX_CHATVIEW_H__0F520FDB_6B3B_460D_92B9_B34A61CB67C6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ChatDoc.h"


class CChatView : public CFormView
{
protected: // create from serialization only
	CChatView();
	DECLARE_DYNCREATE(CChatView)

public:
	//{{AFX_DATA(CChatView)
	enum { IDD = IDD_CHAT_FORM };
	CListBox	m_MessageList;
	CButton	m_Send;
	CButton	m_Information;
	CString	m_SpeakStr;
	//}}AFX_DATA

// Attributes
public:
	CChatDoc* GetDocument();
	bool SimFlag;
	CString name;   //聊天者姓名
	CString age;        //聊天者年纪

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CChatView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CChatView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CChatView)
	afx_msg void OnSend();
	afx_msg void OnInformation();
	afx_msg void OnJoinfed();
	afx_msg void OnResignfed();
	afx_msg void OnUpdateJoinfed(CCmdUI* pCmdUI);
	afx_msg void OnSet();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in ChatView.cpp
inline CChatDoc* CChatView::GetDocument()
   { return (CChatDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CHATVIEW_H__0F520FDB_6B3B_460D_92B9_B34A61CB67C6__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?