home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************
- HTBSwitch.dll
-
- DialogThread.cpp
-
- Copyright 1999 TransEra Corporation
-
- *****************************************************/
- #include "stdafx.h"
- #include "HTBswitch.h"
- #include "DialogThread.h"
- #include "SwitchDlg.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
-
- #endif
-
- extern SwitchDlg * g_SwitchVar; // used to hold pointer to dialog box outside of new thread
-
-
-
- IMPLEMENT_DYNCREATE(DialogThread, CWinThread)
-
- DialogThread::DialogThread()
- {
- }
-
- DialogThread::~DialogThread()
- {
- }
-
-
- /////////////////////////////////////////////////////////////////////////////
- /*
- Function: DialogThread::InitInstance
-
- Description: Initializes values and starts DLG
-
- Return type: BOOL
-
- Notes: Starts dialof Box window and does a modal
- on it for the duartion of its life.
-
- */
- BOOL DialogThread::InitInstance()
- {
- SwitchDlg Dlg; // dialog box
- g_SwitchVar = &Dlg; // save pointer to new dialog box for use outside this thread
- Dlg.DoModal(); // put in on the screen
- return TRUE;
- }
-
-
-
- /////////////////////////////////////////////////////////////////////////////
- /*
- Function: DialogThread::ExitInstance
-
- Description: Closes down Switch
-
- Return type: int
-
- Notes: closes down switch and closes the trea it was running on.
-
- */
- int DialogThread::ExitInstance()
- {
- return CWinThread::ExitInstance();
- }
-
- BEGIN_MESSAGE_MAP(DialogThread, CWinThread)
- //{{AFX_MSG_MAP(DialogThread)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
-
-