www.pudn.com > 200311301927570.rar > RecvThread.h


#if !defined(AFX_RECVTHREAD_H__5A2CCDE3_784E_4757_A5CB_90F33463CAD6__INCLUDED_) 
#define AFX_RECVTHREAD_H__5A2CCDE3_784E_4757_A5CB_90F33463CAD6__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
// RecvThread.h : header file 
// 
 
 
#include "queue.h" 
#include "lable.h" 
#include "Export.h" 
#include "VariantBufConvert.h" 
#include "afxmt.h" 
 
class CHWCmppAPIDlg; 
 
///////////////////////////////////////////////////////////////////////////// 
// CRecvThread thread 
 
class CRecvThread : public CWinThread 
{ 
	BOOL	m_bIsShowMsg; 
	CCriticalSection m_criticalIsShowMsg; 
	DECLARE_DYNCREATE(CRecvThread) 
protected: 
	CRecvThread();           // protected constructor used by dynamic creation 
 
// Attributes 
public: 
	BOOL	m_bIfRun; 
	CQueue	m_queueRW; 
	CHWCmppAPIDlg*	m_pParent; 
 
// Operations 
public: 
	CString m_strMsg; 
	BOOL GetIfShowMsg(); 
	void QuitThread(); 
	void ShowMsg(const CString &strMsg); 
	void SetIfShowMsg(BOOL bIsSHow); 
	BOOL Init(int nID,CString strQueueUp, CString strQueueDown,CHWCmppAPIDlg* pParent); 
	void Stop(); 
	void Start(); 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CRecvThread) 
	public: 
	virtual BOOL InitInstance(); 
	virtual int ExitInstance(); 
	//}}AFX_VIRTUAL 
 
// Implementation 
protected: 
	virtual ~CRecvThread(); 
 
	// Generated message map functions 
	//{{AFX_MSG(CRecvThread) 
		// NOTE - the ClassWizard will add and remove member functions here. 
	//}}AFX_MSG 
	afx_msg LRESULT OnRecvLoop(WPARAM w,LPARAM l); 
	DECLARE_MESSAGE_MAP() 
private: 
	BOOL m_bInit; 
	int m_nID; 
//	int m_nThreadID; 
}; 
#include "HWCmppAPIDlg.h" 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_RECVTHREAD_H__5A2CCDE3_784E_4757_A5CB_90F33463CAD6__INCLUDED_)