⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drawdoc.h

📁 实验七 在网络中传输图像:采用C++
💻 H
字号:
// DrawDoc.h : interface of the CDrawDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_DRAWDOC_H__CA731D4D_FD20_4624_9975_14198399F253__INCLUDED_)
#define AFX_DRAWDOC_H__CA731D4D_FD20_4624_9975_14198399F253__INCLUDED_

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

#include "MySocket.h"
#include "Line.h"
class CDrawDoc : public CDocument
{
protected: // create from serialization only
	CDrawDoc();
	DECLARE_DYNCREATE(CDrawDoc)

// Attributes
public:
	CMySocket m_sConnectSocket;


// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDrawDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	static const COLORREF m_crColors[4];
	UINT GetColor();
	CLine* GetLine(int nIndex);
	int GetLineCount();
	CLine* AddLine(CPoint ptFrom,CPoint ptTo);
	void OnSend();
	void OnReceive();
	void OnClose();
	void OnAccept();
	virtual ~CDrawDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
private:
	UINT m_nColor;
	CObArray m_oaLines;
	CMySocket m_sListenSocket;
	CString m_strName;
	int m_iPort;

// Generated message map functions
protected:
	//{{AFX_MSG(CDrawDoc)
	afx_msg void OnBclose();
	afx_msg void OnConn();
	afx_msg void OnListen();
	afx_msg void OnColorBlack();
	afx_msg void OnUpdateColorBlack(CCmdUI* pCmdUI);
	afx_msg void OnColorBlue();
	afx_msg void OnUpdateColorBlue(CCmdUI* pCmdUI);
	afx_msg void OnColorGreen();
	afx_msg void OnUpdateColorGreen(CCmdUI* pCmdUI);
	afx_msg void OnColorRed();
	afx_msg void OnUpdateColorRed(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_DRAWDOC_H__CA731D4D_FD20_4624_9975_14198399F253__INCLUDED_)

⌨️ 快捷键说明

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