?? server1view.h
字號:
// server1View.h : interface of the CServer1View class
//
/////////////////////////////////////////////////////////////////////////////
/*********************************************************************
//作者:趙明
//EMAIL:zmpapaya@hotmail.com;papaya_zm@sina.com
主頁:http://h2osky.126.com
*********************************************************************/
#include "MainFrm.h"
#include "server1Doc.h"
#include "mysocket.h"
#include "OnlineList.h"
#if !defined(AFX_SERVER1VIEW_H__2AB7A691_0610_454E_9C46_CFDDF1CF7F02__INCLUDED_)
#define AFX_SERVER1VIEW_H__2AB7A691_0610_454E_9C46_CFDDF1CF7F02__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//對全局函數listenthread的聲明,這樣,在server1View.cpp文件中就可以使用這個函數了。
DWORD WINAPI listenthread(LPVOID lpparam);
extern char nameph[10][255];
class CServer1View : public CRichEditView
{
protected: // create from serialization only
CServer1View();
DECLARE_DYNCREATE(CServer1View)
public:
//我猜,下面的這兩個套接字是用來“聊天”的,而并不是用來傳送文件用的。
mysocket* listensocket;
mysocket* chatsocket;
CString fname;
CString fnamepath;
CServer1Doc* GetDocument();
CHARFORMAT cfm;//用于設置RichEdit控件的character formatting attributes。
int count;//用作zmfile數組的下標。
// Operations
BOOL m_bStarted;//用來記錄 服務器是否已經啟動了。
BOOL m_chat;
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CServer1View)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void OnInitialUpdate(); // called first time after construct
//}}AFX_VIRTUAL
// Implementation
public:
SOCKET m_sListening;//監聽套接字,用于文件傳輸,不是聊天。
void Message(LPCTSTR lpszMessage,COLORREF clr);
void recevied();
void accept();
virtual ~CServer1View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CServer1View)
afx_msg void OnDestroy();
afx_msg void OnServerStart();
afx_msg int addfile();//added by author
afx_msg LRESULT addmessage(WPARAM wParam, LPARAM lParam);//added by author
afx_msg void OnSend();
afx_msg LRESULT OnKSend(WPARAM wParam,LPARAM lParam);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in server1View.cpp
inline CServer1Doc* CServer1View::GetDocument()
{ return (CServer1Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SERVER1VIEW_H__2AB7A691_0610_454E_9C46_CFDDF1CF7F02__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -