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

📄 workerthread.cpp

📁 VC++串口通信设。本书详细说明讲解了在VC++环境下编写串口通信得过程。值得一看
💻 CPP
字号:
// WorkerThread.cpp : implementation file
//

#include "stdafx.h"
#include "cwinthread.h"
#include "WorkerThread.h"

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

/////////////////////////////////////////////////////////////////////////////
// WorkerThread

IMPLEMENT_DYNCREATE(WorkerThread, CWinThread)

WorkerThread::WorkerThread()
{
}

WorkerThread::~WorkerThread()
{
}

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

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

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

/////////////////////////////////////////////////////////////////////////////
// WorkerThread message handlers

int WorkerThread::Run()
{
  MSG msg;
  while (::GetMessage(&msg, NULL, 0, 0))
  {
    switch(msg.message)
    {
    case MYMESSAGE:
      TRACE(":Message Received\n");
      break;
    default:
      break;
    }
  }
  return 0;
}

⌨️ 快捷键说明

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