// MyThread.cpp : implementation file // #include "stdafx.h" #include "test.h" #include "MyThread.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CMyThread IMPLEMENT_DYNCREATE(CMyThread, CWinThread) CMyThread::CMyThread() { } CMyThread::~CMyThread() { } BOOL CMyThread::InitInstance() { // TODO: perform and per-thread initialization here m_dlg.Create(IDD_DIALOG1); m_dlg.ShowWindow(SW_SHOW); m_pMainWnd = &m_dlg; return TRUE; } int CMyThread::ExitInstance() { // TODO: perform any per-thread cleanup here m_dlg.DestroyWindow(); return CWinThread::ExitInstance(); } BEGIN_MESSAGE_MAP(CMyThread, CWinThread) //{{AFX_MSG_MAP(CMyThread) // NOTE - the ClassWizard will add and remove mapping macros here. //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CMyThread message handlers