www.pudn.com > pCom.rar > ExeThread.cpp


// ExeThread.cpp : 实现文件 
// 
 
#include "stdafx.h" 
#include "RadioTest.h" 
#include "ExeThread.h" 
#include ".\exethread.h" 
 
 
// ExeThread 
 
IMPLEMENT_DYNCREATE(ExeThread, CWinThread) 
 
ExeThread::ExeThread() 
{ 
} 
 
ExeThread::~ExeThread() 
{ 
} 
 
BOOL ExeThread::InitInstance() 
{ 
	// TODO: 在此执行任意逐线程初始化 
	return TRUE; 
} 
 
int ExeThread::ExitInstance() 
{ 
	// TODO: 在此执行任意逐线程清理 
	return CWinThread::ExitInstance(); 
} 
 
BEGIN_MESSAGE_MAP(ExeThread, CWinThread) 
	ON_THREAD_MESSAGE(KEY_TEST,OnKeyTest) 
END_MESSAGE_MAP() 
 
 
// ExeThread 消息处理程序 
 
afx_msg void ExeThread::OnKeyTest(WPARAM wParam, LPARAM lParam) 
{ 
	CRadioTestDlg *pwnd=(CRadioTestDlg*)wParam; 
	pwnd->SendMessage(EXECUTE_CMD); 
	pwnd->pRadioCtrl.btnClick((int)lParam); 
	pwnd->SendMessage(END_CMD); 
	return; 
} 
 
afx_msg void ExeThread::OnGetSN(WPARAM wParam, LPARAM lParam) 
{ 
	CRadioTestDlg *pwnd=(CRadioTestDlg*)wParam; 
	CmdMessage *mymsg=(CmdMessage*)lParam; 
	return afx_msg void(); 
} 
 
afx_msg void ExeThread::OnGetVersion(WPARAM wParam, LPARAM lParam) 
{ 
	CRadioTestDlg *pwnd=(CRadioTestDlg*)wParam; 
	CmdMessage *mymsg=(CmdMessage*)lParam; 
	return afx_msg void(); 
} 
 
afx_msg void ExeThread::OnSendCmd(WPARAM wParam, LPARAM lParam) 
{ 
	CRadioTestDlg *pwnd=(CRadioTestDlg*)wParam; 
	CmdMessage *mymsg=(CmdMessage*)lParam; 
	return afx_msg void(); 
}