examplethread.cpp
来自「从学案例入手」· C++ 代码 · 共 57 行
CPP
57 行
// ExampleThread.cpp : implementation file
//
#include "stdafx.h"
#include "UIThread.h"
#include "ExampleThread.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CExampleThread
IMPLEMENT_DYNCREATE(CExampleThread, CWinThread)
CExampleThread::CExampleThread()
{
m_bDone=FALSE;//初始化允许线程运行
m_pOwner=NULL;//将该指针置为空
m_bAutoDelete=FALSE;//要求手动删除线程对象
}
CExampleThread::~CExampleThread()
{
}
BOOL CExampleThread::InitInstance()
{
// TODO: perform and per-thread initialization here
return TRUE;
}
int CExampleThread::ExitInstance()
{
// TODO: perform any per-thread cleanup here
return CWinThread::ExitInstance();
}
BEGIN_MESSAGE_MAP(CExampleThread, CWinThread)
//{{AFX_MSG_MAP(CExampleThread)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CExampleThread message handlers
void CExampleThread::SetOwner(CUIThreadDlg *pOwner)
{
m_pOwner=pOwner;
//取类CMutexesDlg的指针
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?