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