statusthread.cpp

来自「vc++6.0开发网络典型应用实例导航 1. 本光盘提供了本书中所有的实例源」· C++ 代码 · 共 51 行

CPP
51
字号
// StatusThread.cpp : implementation file
//

#include "stdafx.h"
#include "Netmsg.h"
#include "StatusThread.h"
#include "TransferStatus.h"

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

//the thread that drives a file xfer when used outside a conversation window

CStatusThread::CStatusThread()
{
	Dialog = NULL;
	Init = false;
}

CStatusThread::~CStatusThread()
{
}

BOOL CStatusThread::InitInstance()
{
	Dialog = new CTransferStatus(NULL, this);
	m_pMainWnd = Dialog;
	Dialog->DoModal();
	delete Dialog;
	PostThreadMessage(WM_QUIT, 0, 0);
	return TRUE;
}

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

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

/////////////////////////////////////////////////////////////////////////////
// CStatusThread message handlers

⌨️ 快捷键说明

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