threadapp.cpp

来自「MFC程序开发参考大全 【明日科技】宋坤 刘锐宁 李伟明 【丛 书 名】」· C++ 代码 · 共 59 行

CPP
59
字号
// ThreadApp.cpp : implementation file
//

#include "stdafx.h"
#include "EncapsulateThread.h"
#include "ThreadApp.h"
#include "EncapsulateThreadDlg.h"
#include "BookInfo.h"

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

/////////////////////////////////////////////////////////////////////////////
// CThreadApp

IMPLEMENT_DYNCREATE(CThreadApp, CWinThread)

CThreadApp::CThreadApp()
{

}

CThreadApp::~CThreadApp()
{

}

BOOL CThreadApp::InitInstance()
{
	CBookInfo dlg;
	m_pMainWnd = &dlg;
	dlg.DoModal();

	return TRUE;
}

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

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

/////////////////////////////////////////////////////////////////////////////
// CThreadApp message handlers

BOOL CThreadApp::PreTranslateMessage(MSG* pMsg) 
{	
	return CWinThread::PreTranslateMessage(pMsg);
}

⌨️ 快捷键说明

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