www.pudn.com > c++或C下如何使用多线程.zip > MainFrm.h


// MainFrm.h : interface of the CMainFrame class 
// 
///////////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_MAINFRM_H__777962A1_0D31_4A08_9C6F_4D6882A0A1F5__INCLUDED_) 
#define AFX_MAINFRM_H__777962A1_0D31_4A08_9C6F_4D6882A0A1F5__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
#include "basethread.h" 
#include "counterthread.h" 
 
class CMainFrame : public CFrameWnd 
{ 
	 
protected: // create from serialization only 
	CMainFrame(); 
	DECLARE_DYNCREATE(CMainFrame) 
 
// Attributes 
public: 
	CTypedPtrList m_ThreadsList; 
 
private: 
	BOOL m_bThreadStop; 
	BOOL m_bThreadStart; 
 
// Operations 
public: 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CMainFrame) 
	public: 
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 
	virtual BOOL DestroyWindow(); 
	//}}AFX_VIRTUAL 
 
// Implementation 
public: 
	void StopThread(); 
	void StartThread(); 
	virtual ~CMainFrame(); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected:  // control bar embedded members 
	CStatusBar  m_wndStatusBar; 
	CToolBar    m_wndToolBar; 
 
// Generated message map functions 
protected: 
	//{{AFX_MSG(CMainFrame) 
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 
	afx_msg void OnCounterStart(); 
	afx_msg void OnUpdateCounterStart(CCmdUI* pCmdUI); 
	afx_msg void OnCounterStop(); 
	afx_msg void OnUpdateCounterStop(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_MAINFRM_H__777962A1_0D31_4A08_9C6F_4D6882A0A1F5__INCLUDED_)