德国hattersheim在足球里是什么意思

Hattersheim的海词问答与网友补充:
Hattersheim的相关资料:
相关词典网站:已添加的类,在编译时错误提示类没有定义,这是什么原因? - 开源中国社区
当前访客身份:游客 [
当前位置:
相关代码如下:
ChatServer.cpp
#include &stdafx.h&
#include &ChatServer.h&
#include &ChatView.h&
#include &MainFrm.h&
#include &ChatServerDoc.h&
#include &ChatServerView.h&
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// CChatServerApp
BEGIN_MESSAGE_MAP(CChatServerApp, CWinApp)
//{{AFX_MSG_MAP(CChatServerApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChatServerApp construction
CChatServerApp::CChatServerApp()
// TODO: add construction code here,
// Place all significant initialization in InitInstance
/////////////////////////////////////////////////////////////////////////////
// The one and only CChatServerApp object
CChatServerApp theA
/////////////////////////////////////////////////////////////////////////////
// CChatServerApp initialization
BOOL CChatServerApp::InitInstance()
if (!AfxSocketInit())
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return FALSE;
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
of your final executable, you should remove from the following
the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls();
// Call this when using MFC in a shared DLL
Enable3dControlsStatic(); // Call this when linking to MFC statically
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T(&Local AppWizard-Generated Applications&));
LoadStdProfileSettings();
// Load standard INI file options (including MRU)
// Register the application's document templates.
Document templates
serve as the connection between documents, frame windows and views.
CSingleDocTemplate* pDocT
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CChatServerDoc),
RUNTIME_CLASS(CMainFrame),
// main SDI frame window
RUNTIME_CLASS(CChatServerView));
AddDocTemplate(pDocTemplate);
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdI
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initialized, so show and update it.
m_pMainWnd-&ShowWindow(SW_SHOW);
m_pMainWnd-&UpdateWindow();
return TRUE;
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX);
// DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
// No message handlers
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
// App command to run the dialog
void CChatServerApp::OnAppAbout()
CAboutDlg aboutD
aboutDlg.DoModal();
/////////////////////////////////////////////////////////////////////////////
// CChatServerApp message handlers
ChatServerDoc.cpp
#include &stdafx.h&
#include &ChatServer.h&
#include &ChatView.h&
#include &ChatServerDoc.h&
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// CChatServerDoc
IMPLEMENT_DYNCREATE(CChatServerDoc, CDocument)
BEGIN_MESSAGE_MAP(CChatServerDoc, CDocument)
//{{AFX_MSG_MAP(CChatServerDoc)
// NOTE - the ClassWizard will add and remove mapping macros here.
DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChatServerDoc construction/destruction
CChatServerDoc::CChatServerDoc()
// TODO: add one-time construction code here
CChatServerDoc::~CChatServerDoc()
BOOL CChatServerDoc::OnNewDocument()
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
/////////////////////////////////////////////////////////////////////////////
// CChatServerDoc serialization
void CChatServerDoc::Serialize(CArchive& ar)
if (ar.IsStoring())
// TODO: add storing code here
// TODO: add loading code here
/////////////////////////////////////////////////////////////////////////////
// CChatServerDoc diagnostics
#ifdef _DEBUG
void CChatServerDoc::AssertValid() const
CDocument::AssertValid();
void CChatServerDoc::Dump(CDumpContext& dc) const
CDocument::Dump(dc);
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CChatServerDoc commands
ChatServerView.cpp
#include &stdafx.h&
#include &ChatServer.h&
#include &ChatView.h&
#include &ChatServerDoc.h&
#include &ChatServerView.h&
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// CChatServerView
IMPLEMENT_DYNCREATE(CChatServerView, CListView)
BEGIN_MESSAGE_MAP(CChatServerView, CListView)
//{{AFX_MSG_MAP(CChatServerView)
// NOTE - the ClassWizard will add and remove mapping macros here.
DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CListView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CListView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CListView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChatServerView construction/destruction
CChatServerView::CChatServerView()
// TODO: add construction code here
CChatServerView::~CChatServerView()
BOOL CChatServerView::PreCreateWindow(CREATESTRUCT& cs)
// TODO: Modify the Window class or styles here by modifying
the CREATESTRUCT cs
return CListView::PreCreateWindow(cs);
/////////////////////////////////////////////////////////////////////////////
// CChatServerView drawing
void CChatServerView::OnDraw(CDC* pDC)
CChatServerDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
void CChatServerView::OnInitialUpdate()
CListView::OnInitialUpdate();
// TODO: You may populate your ListView with items by directly accessing
its list control through a call to GetListCtrl().
/////////////////////////////////////////////////////////////////////////////
// CChatServerView printing
BOOL CChatServerView::OnPreparePrinting(CPrintInfo* pInfo)
// default preparation
return DoPreparePrinting(pInfo);
void CChatServerView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
// TODO: add extra initialization before printing
void CChatServerView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
// TODO: add cleanup after printing
/////////////////////////////////////////////////////////////////////////////
// CChatServerView diagnostics
#ifdef _DEBUG
void CChatServerView::AssertValid() const
CListView::AssertValid();
void CChatServerView::Dump(CDumpContext& dc) const
CListView::Dump(dc);
CChatServerDoc* CChatServerView::GetDocument() // non-debug version is inline
ASSERT(m_pDocument-&IsKindOf(RUNTIME_CLASS(CChatServerDoc)));
return (CChatServerDoc*)m_pD
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CChatServerView message handlers
ChattersListView.cpp
#include &ChatView.h&
//#include&ChattersListView.h&
#include &stdafx.h&
#include &ChatServer.h&
#include &ChattersListView.h&
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// CChattersListView
IMPLEMENT_DYNCREATE(CChattersListView, CListView)
CChattersListView::CChattersListView()
CChattersListView::~CChattersListView()
BEGIN_MESSAGE_MAP(CChattersListView, CListView)
//{{AFX_MSG_MAP(CChattersListView)
ON_WM_CREATE()
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChattersListView drawing
void CChattersListView::OnDraw(CDC* pDC)
CDocument* pDoc = GetDocument();
// TODO: add draw code here
/////////////////////////////////////////////////////////////////////////////
// CChattersListView diagnostics
#ifdef _DEBUG
void CChattersListView::AssertValid() const
CListView::AssertValid();
void CChattersListView::Dump(CDumpContext& dc) const
CListView::Dump(dc);
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CChattersListView message handlers
//BOOL CChattersListView::PreCreateWindow(CREATESTRUCT &cs)
//设定风格为详细报表显示
//cs.style|=LVS_REPORT;
//return CListView::PreCreateWindow(cs);
int CChattersListView::OnCreate(LPCREATESTRUCT lpCreateStruct)
if (CListView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
GetClientRect(&rect);
GetListCtrl().InsertColumn(0,&用户名&);
GetListCtrl().InsertColumn(1,&登录时间&);
GetListCtrl().InsertColumn(2,&地址&);
void CChattersListView::OnSize(UINT nType, int cx, int cy)
CListView::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
GetListCtrl().SetColumnWidth(0,cx/3);
GetListCtrl().SetColumnWidth(1,cx/3);
GetListCtrl().SetColumnWidth(2,cx/3);
void CChattersListView::AddChatter(CString Name, CString IPAddress, UINT Port)
//插入用户名
lvi.mask=LVIF_TEXT;
lvi.iItem=m_Row++;
lvi.iSubItem=0;
lvi.pszText=Name.GetBuffer(Name.GetLength());
int iActualItem=GetListCtrl().InsertItem(&lvi);
//插入登录时间
//得到系统时间
struct tm *
ptm=localtime(&t);
//将其转化成字符形式
CString sD
sDate.Format(&%.19s&,asctime(ptm));
//得到小时、分钟、秒
int iHours,iMins,iS
iHours=atoi(sDate.Mid(11,2));
iMins=atoi(sDate.Mid(14,2));
iSecs=atoi(sDate.Mid(17,2));
//将其转化为字符串
CString sHours,sMins,sS
sHours.Format(&%d:&,iHours);
if(iHours&10)
sHours.Insert(0,'0');
sMins.Format(&%d:&,iMins);
if(iMins&10)
sMins.Insert(0,'0');
sSecs.Format(&%d:&,iSecs);
if(iSecs&10)
sSecs.Insert(0,'0');
CString sDisplayT
sDisplayTime=sHours+sMins+sS
lvi.mask=LVIF_TEXT;
lvi.iItem=iActualI
lvi.iSubItem=1;
lvi.pszText=sDisplayTime.GetBuffer(sDisplayTime.GetLength());
BOOL test=GetListCtrl().SetItem(&lvi);
//插入客户端地址
CString sIPP
sIPPort.Format(&%s:%d&,IPAddress,Port);
lvi.mask=LVIF_TEXT;
lvi.iSubItem=2;
lvi.pszText=sIPPort.GetBuffer(sIPPort.GetLength());
GetListCtrl().SetItem(&lvi);
void CChattersListView::DeleteChatter(CString Name)
LVFINDINFO
lvfi.flags=LVFI_STRING;
lvfi.psz=Name.GetBuffer(Name.GetLength());
//在列表中查找用户名,得到其索引值
int nFoundAt=GetListCtrl().FindItem(&lvfi);
//如果找到则将其删除
if(nFoundAt!=-1)
GetListCtrl().DeleteItem(nFoundAt);
BOOL CChattersListView::OnCreateClient(LPCREATESTRUCT lps, CCreateContext *pContext)
//将窗口分为两行一列
CSplitterWnd m_wndS
if(!m_wndSplitter.CreateStatic(this,2,1))
return FALSE;
//指定每个窗口的位置及初始大小
if(!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CChattersListView),CSize(150,100),
pContext)||
!m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CChatView),CSize(300,300),pContext))
m_wndSplitter.DestroyWindow();
return FALSE;
return TRUE;
ChatView.cpp
#include &stdafx.h&
#include &ChatServer.h&
#include &ChatView.h&
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// CChatView
IMPLEMENT_DYNCREATE(CChatView, CView)
CChatView::CChatView()
CChatView::~CChatView()
BEGIN_MESSAGE_MAP(CChatView, CView)
//{{AFX_MSG_MAP(CChatView)
ON_WM_CREATE()
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChatView drawing
void CChatView::OnDraw(CDC* pDC)
CDocument* pDoc = GetDocument();
// TODO: add draw code here
/////////////////////////////////////////////////////////////////////////////
// CChatView diagnostics
#ifdef _DEBUG
void CChatView::AssertValid() const
CView::AssertValid();
void CChatView::Dump(CDumpContext& dc) const
CView::Dump(dc);
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CChatView message handlers
int CChatView::OnCreate(LPCREATESTRUCT lpCreateStruct)
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
GetClientRect(&rect);
m_EditBox.Create(WS_VISIBLE|
WS_BORDER|
ES_MULTILINE|
WS_VSCROLL,
rect,this,0);
void CChatView::OnSize(UINT nType, int cx, int cy)
CView::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
m_EditBox.MoveWindow(0,0,cx,cy,FALSE);
void CChatView::ShowMessage(LPCTSTR lpszMessage)
CString strTemp=lpszM
strTemp+=_T(&\r\n&);
int len=m_EditBox.GetWindowTextLength();
m_EditBox.SetSel(len,len);
m_EditBox.ReplaceSel(strTemp);
MainFrm.cpp
#include &ChatView.h&
#include &ChattersListView.h&
#include &stdafx.h&
#include &ChatServer.h&
#include &MainFrm.h&
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// CMainFrame
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMainFrame)
// NOTE - the ClassWizard will add and remove mapping macros here.
DO NOT EDIT what you see in these blocks of generated code !
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
static UINT indicators[] =
ID_SEPARATOR,
// status line indicator
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
/////////////////////////////////////////////////////////////////////////////
// CMainFrame construction/destruction
CMainFrame::CMainFrame()
// TODO: add member initialization code here
//CSplitterWnd m_wndSplitter=0;
CMainFrame::~CMainFrame()
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
TRACE0(&Failed to create toolbar\n&);
return -1;
// fail to create
if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators,
sizeof(indicators)/sizeof(UINT)))
TRACE0(&Failed to create status bar\n&);
return -1;
// fail to create
// TODO: Delete these three lines if you don't want the toolbar to
be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
the CREATESTRUCT cs
return TRUE;
/////////////////////////////////////////////////////////////////////////////
// CMainFrame diagnostics
#ifdef _DEBUG
void CMainFrame::AssertValid() const
CFrameWnd::AssertValid();
void CMainFrame::Dump(CDumpContext& dc) const
CFrameWnd::Dump(dc);
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMainFrame message handlers
//DEL BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext *pContext)
//将窗口分为两行一列
if(!m_wndSplitter.CreateStatic(this,2,1))
return FALSE;
//指定每个窗口的位置及初始大小
if(!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CChattersListView),CSize(150,100),
pContext)||!m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CChatView),CSize(300,300),
pContext))
m_wndSplitter.DestroyWindow();
return FALSE;
return TURE;
/*BOOL CMainFrame::PreCreateWindow(CREATESTRUCT &cs)
//设定分格为详细报表显示
cs.style|=LVS_REPORT;
return CListView::PreCreateWindow(cs);
#include &stdafx.h&
#include &ChatServer.h&
#include &Msg.h&
//#define IMPLEMENT_DYNCREATE(CMsg,CObject)
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CMsg::CMsg()
//在构造函数中对成员变量初始化
CMsg::~CMsg()
void CMsg::Init()
//函数Init()代码
m_bClose=FALSE;
m_strText=_T(&&);
void CMsg::Serialize(CArchive &ar)
//重载函数串行化函数的代码
if(ar.IsStoring())
ar&&(WORD)m_bC
ar&&m_strT
m_bClose=(BOOL)
ar&&m_strT
ar&&(UINT)
StdAfx.cpp
// stdafx.cpp : source file that includes just the standard includes
// ChatServer.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include &stdafx.h&
相关头文件如下:
ChatterServr.h
// ChatServer.h : main header file for the CHATSERVER application
#if !defined(AFX_CHATSERVER_H__01F55DBE_11CA_4DAA_857B_DD83__INCLUDED_)
#define AFX_CHATSERVER_H__01F55DBE_11CA_4DAA_857B_DD83__INCLUDED_
#if _MSC_VER & 1000
#pragma once
#endif // _MSC_VER & 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#include &resource.h&
// main symbols
/////////////////////////////////////////////////////////////////////////////
// CChatServerApp:
// See ChatServer.cpp for the implementation of this class
class CChatServerApp : public CWinApp
CChatServerApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChatServerApp)
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CChatServerApp)
afx_msg void OnAppAbout();
// NOTE - the ClassWizard will add and remove member functions here.
DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHATSERVER_H__01F55DBE_11CA_4DAA_857B_DD83__INCLUDED_)
ChatServerDoc.h
// ChatServerDoc.h : interface of the CChatServerDoc class
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CHATSERVERDOC_H__13CAB302_0FB1_45C2_ABBC_8E2E6C0263AB__INCLUDED_)
#define AFX_CHATSERVERDOC_H__13CAB302_0FB1_45C2_ABBC_8E2E6C0263AB__INCLUDED_
#if _MSC_VER & 1000
#pragma once
#endif // _MSC_VER & 1000
class CChatServerDoc : public CDocument
protected: // create from serialization only
CChatServerDoc();
DECLARE_DYNCREATE(CChatServerDoc)
// Attributes
// Operations
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChatServerDoc)
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
//}}AFX_VIRTUAL
// Implementation
virtual ~CChatServerDoc();
#ifdef _DEBUG
virtual void AssertValid()
virtual void Dump(CDumpContext& dc)
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CChatServerDoc)
// NOTE - the ClassWizard will add and remove member functions here.
DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHATSERVERDOC_H__13CAB302_0FB1_45C2_ABBC_8E2E6C0263AB__INCLUDED_)
ChatServerView.h
/ ChatServerView.h : interface of the CChatServerView class
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CHATSERVERVIEW_H__B0FD96DB_8A7F_435B_B1C6_14B70F5ADC66__INCLUDED_)
#define AFX_CHATSERVERVIEW_H__B0FD96DB_8A7F_435B_B1C6_14B70F5ADC66__INCLUDED_
#if _MSC_VER & 1000
#pragma once
#endif // _MSC_VER & 1000
class CChatServerView : public CListView
protected: // create from serialization only
CChatServerView();
DECLARE_DYNCREATE(CChatServerView)
// Attributes
CChatServerDoc* GetDocument();
// Operations
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChatServerView)
virtual void OnDraw(CDC* pDC);
// overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
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);
//}}AFX_VIRTUAL
// Implementation
virtual ~CChatServerView();
#ifdef _DEBUG
virtual void AssertValid()
virtual void Dump(CDumpContext& dc)
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CChatServerView)
// NOTE - the ClassWizard will add and remove member functions here.
DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
#ifndef _DEBUG
// debug version in ChatServerView.cpp
inline CChatServerDoc* CChatServerView::GetDocument()
{ return (CChatServerDoc*)m_pD }
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHATSERVERVIEW_H__B0FD96DB_8A7F_435B_B1C6_14B70F5ADC66__INCLUDED_)
ChattersListView.h
#if !defined(AFX_CHATTERSLISTVIEW_H__069D_43C1_ABBD_DD635C3D2650__INCLUDED_)
#define AFX_CHATTERSLISTVIEW_H__069D_43C1_ABBD_DD635C3D2650__INCLUDED_
#if _MSC_VER & 1000
#pragma once
#endif // _MSC_VER & 1000
// ChattersListView.h : header file
/////////////////////////////////////////////////////////////////////////////
// CChattersListView view
class CChattersListView : public CListView
protected:
CChattersListView();
// protected constructor used by dynamic creation
DECLARE_DYNCREATE(CChattersListView)
// Attributes
// Operations
virtual BOOL OnCreateClient(LPCREATESTRUCT lps,CCreateContext*
pContext);
void DeleteChatter(CString Name);
void AddChatter(CString Name,CString IPAddress,UINT Port);
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChattersListView)
protected:
virtual void OnDraw(CDC* pDC);
// overridden to draw this view
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CChattersListView();
#ifdef _DEBUG
virtual void AssertValid()
virtual void Dump(CDumpContext& dc)
// Generated message map functions
protected:
//{{AFX_MSG(CChattersListView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHATTERSLISTVIEW_H__069D_43C1_ABBD_DD635C3D2650__INCLUDED_)
ChatView.h
#if !defined(AFX_CHATVIEW_H__5CABA956_D584_4563_AB35_F7BF01982C0F__INCLUDED_)
#define AFX_CHATVIEW_H__5CABA956_D584_4563_AB35_F7BF01982C0F__INCLUDED_
#if _MSC_VER & 1000
#pragma once
#endif // _MSC_VER & 1000
// ChatView.h : header file
/////////////////////////////////////////////////////////////////////////////
// CChatView view
class CChatView : public CView
protected:
CChatView();
// protected constructor used by dynamic creation
DECLARE_DYNCREATE(CChatView)
// Attributes
// Operations
CEdit m_EditB
void ShowMessage(LPCTSTR lpszMessage);
//CEdit m_EditB
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChatView)
protected:
virtual void OnDraw(CDC* pDC);
// overridden to draw this view
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CChatView();
#ifdef _DEBUG
virtual void AssertValid()
virtual void Dump(CDumpContext& dc)
// Generated message map functions
protected:
//{{AFX_MSG(CChatView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHATVIEW_H__5CABA956_D584_4563_AB35_F7BF01982C0F__INCLUDED_)
// MainFrm.h : interface of the CMainFrame class
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAINFRM_H__3C186A3A__A5E5_64D8FE6FEC58__INCLUDED_)
#define AFX_MAINFRM_H__3C186A3A__A5E5_64D8FE6FEC58__INCLUDED_
#if _MSC_VER & 1000
#pragma once
#endif // _MSC_VER & 1000
class CMainFrame : public CFrameWnd
protected: // create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
// Attributes
// Operations
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
//}}AFX_VIRTUAL
// Implementation
CSplitterWnd m_wndS
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//CSplitterWnd m_wndS
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid()
virtual void Dump(CDumpContext& dc)
protected:
// control bar embedded members
CStatusBar
m_wndStatusB
m_wndToolB
// Generated message map functions
protected:
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
// NOTE - the ClassWizard will add and remove member functions here.
DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAINFRM_H__3C186A3A__A5E5_64D8FE6FEC58__INCLUDED_)
// Msg.h: interface for the CMsg class.
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MSG_H__2DEDC35D_C349_4DD8_B777_D2EAC8ED3DD5__INCLUDED_)
#define AFX_MSG_H__2DEDC35D_C349_4DD8_B777_D2EAC8ED3DD5__INCLUDED_
#define DECLARE_DYNCREATE(CMsg)
#define IMPLEMENT_DYNCREATE(CMsg,CObject)
#if _MSC_VER & 1000
#pragma once
#endif // _MSC_VER & 1000
class CMsg : public CObject
virtual void Serialize(CArchive &ar);
void Init();
//加入变量
//加入变量
CString m_strT
//加入变量
virtual ~CMsg();
#endif // !defined(AFX_MSG_H__2DEDC35D_C349_4DD8_B777_D2EAC8ED3DD5__INCLUDED_)
Resource.h
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by CHATSERVER.RC
#define IDD_ABOUTBOX
#define IDP_SOCKETS_INIT_FAILED
#define IDR_MAINFRAME
#define IDR_CHATSETYPE
// Next default values for new objects
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS
#define _APS_NEXT_RESOURCE_VALUE 130
#define _APS_NEXT_CONTROL_VALUE
#define _APS_NEXT_SYMED_VALUE
#define _APS_NEXT_COMMAND_VALUE
// stdafx.h : include file for standard system include files,
or project specific include files that are used frequently, but
are changed infrequently
#if !defined(AFX_STDAFX_H__DC4C45A9_AD87_4F48_89C7_5EBB__INCLUDED_)
#define AFX_STDAFX_H__DC4C45A9_AD87_4F48_89C7_5EBB__INCLUDED_
#if _MSC_VER & 1000
#pragma once
#endif // _MSC_VER & 1000
#define VC_EXTRALEAN
// Exclude rarely-used stuff from Windows headers
#include &afxwin.h&
// MFC core and standard components
#include &afxext.h&
// MFC extensions
#include &afxcview.h&
#include &afxdisp.h&
// MFC Automation classes
#include &afxdtctl.h&
// MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include &afxcmn.h&
// MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include &afxsock.h&
// MFC socket extensions
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__DC4C45A9_AD87_4F48_89C7_5EBB__INCLUDED_)
运行的错误提示如下:
Compiling...
ChattersListView.cpp
H:\4-2-2\C++\Visual
C++ 6.0从入门到精通\ChatServer\ChattersListView.cpp(212) : error C2653: 'CChatView' : is not a class or namespace name
H:\4-2-2\C++\Visual
C++ 6.0从入门到精通\ChatServer\ChattersListView.cpp(212) : error C2065: 'classCChatView' : undeclared identifier
执行 cl.exe 时出错.
ChatServer.exe - 1 error(s), 0 warning(s)
还请高人指点!!!不胜感激!!!
共有0个答案
更多开发者职位上
有什么技术问题吗?
高剑明的其它问题
类似的话题}

我要回帖

更多关于 足球独赢是什么意思 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信