// RW_Thread.cpp : implementation file #include "stdafx.h" #include "RW_Thread.h" IMPLEMENT_DYNCREATE(RW_Thread, CWinThread) RW_Thread::RW_Thread() { } RW_Thread::~RW_Thread() { } BOOL RW_Thread::InitInstance() { BOOL ret; RW_Dialog* RW_Dlg; RW_Dlg = new RW_Dialog(); //Check if new succeeded and a valid pointer to a dialog object is //created. if(RW_Dlg != NULL) { ret = RW_Dlg->Create(IDD_RW_DIALOG, RW_Dlg); if(!ret) //Create failed. AfxMessageBox("Error creating RW dialog"); RW_Dlg->ShowWindow(SW_SHOW); } else AfxMessageBox("Error Creating Dialog Object"); m_pMainWnd = RW_Dlg; return TRUE; } int RW_Thread::ExitInstance() { // TODO: perform any per-thread cleanup here return CWinThread::ExitInstance(); } BEGIN_MESSAGE_MAP(RW_Thread, CWinThread) END_MESSAGE_MAP() // RW_Thread message handlers