clientthread.h

来自「一个关于下载文件客户程序的小程序」· C头文件 代码 · 共 72 行

H
72
字号
#if !defined(AFX_CLIENTTHREAD_H__C0B153A4_32EC_4A00_A017_3F02B262207E__INCLUDED_)
#define AFX_CLIENTTHREAD_H__C0B153A4_32EC_4A00_A017_3F02B262207E__INCLUDED_

#include "Client.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ClientThread.h : header file
//



/////////////////////////////////////////////////////////////////////////////
// CClientThread thread

class CClientThread : public CWinThread
{
	DECLARE_DYNCREATE(CClientThread)
protected:
	CClientThread();           // protected constructor used by dynamic creation

// Attributes
public:

// Operations
public:
	CString m_strServerIP;
	CClient* m_pClient;
	CWnd* m_pParentWnd;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CClientThread)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	//}}AFX_VIRTUAL

// Implementation
protected:
	void OnConnect();
	void OnDisconnect();
	void OnBrowse();
	void OnDownload();
	void OnCancelDownload();
	void OnTerminate();

	void ExitClientThread();
	void ProcessTimer();

	virtual ~CClientThread();

	// Generated message map functions
	//{{AFX_MSG(CClientThread)
		// NOTE - the ClassWizard will add and remove member functions here.
		afx_msg void OnClientCmd(UINT wParam, LONG lParam);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
private:
	BOOL m_bDataReceived;
	UINT m_nTimerID;
};

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

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

#endif // !defined(AFX_CLIENTTHREAD_H__C0B153A4_32EC_4A00_A017_3F02B262207E__INCLUDED_)

⌨️ 快捷键说明

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