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

📄 dowiththread.cpp

📁 PDA通讯网关服务器源码程序
💻 CPP
字号:
// DoWithThread.cpp : implementation file
//

#include "stdafx.h"
#include "GateAgent.h"
#include "DoWithThread.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


extern g_nMax;
/////////////////////////////////////////////////////////////////////////////
// CDoWithThread

IMPLEMENT_DYNCREATE(CDoWithThread, CWinThread)

CDoWithThread::CDoWithThread()
{
	
}

CDoWithThread::~CDoWithThread()
{
	if (g_nMax>0)
	{
		g_nMax=g_nMax-1;
		CString strTmp;
		strTmp.Format("处理接收消息的线程退出,目前线程总数目%d",g_nMax);
		m_pDlg->OnInsertMess(strTmp.GetBuffer(0),true,false);		
	}
}

BOOL CDoWithThread::InitInstance()
{
	// TODO:  perform and per-thread initialization here
	return TRUE;
}

int CDoWithThread::ExitInstance()
{
	// TODO:  perform any per-thread cleanup here
	return CWinThread::ExitInstance();
}

BEGIN_MESSAGE_MAP(CDoWithThread, CWinThread)
	//{{AFX_MSG_MAP(CDoWithThread)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDoWithThread message handlers

int CDoWithThread::Run() 
{
	//处理消息

	m_pDlg->OnDoWith(0,m_TPA,m_TP_SCTS,m_TP_UD,0);
//	m_pDlg->OnDoWith(0,"8613755088557","05122317231212","001*a1,2,3,002*a2,3,4#",0)
	return 0;
}

⌨️ 快捷键说明

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