home *** CD-ROM | disk | FTP | other *** search
/ HTBasic 9.3 / HTBasic 9.3.iso / 93win / data1.cab / DLL_Toolkit / Source / HTBButton / DialogThread.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2005-03-02  |  1.4 KB  |  66 lines

  1. // DialogThread.cpp : implementation file
  2. //    High Tech BASIC, Copyright (C) TransEra Corp 1999, All Rights Reserved.
  3.  
  4. #include "stdafx.h"
  5. #include "button.h"
  6. #include "DialogThread.h"
  7. #include "buttonDlg.h"
  8. #include "export.h"
  9.  
  10. #ifdef _DEBUG
  11. #define new DEBUG_NEW
  12. #undef THIS_FILE
  13. static char THIS_FILE[] = __FILE__;
  14.  
  15. #endif
  16.  
  17. extern ButtonDlg* g_pBtnDlg;            // global pointer to button dialog used for setting focus and closing
  18. /////////////////////////////////////////////////////////////////////////////
  19. // DialogThread
  20.  
  21. IMPLEMENT_DYNCREATE(DialogThread, CWinThread)
  22.  
  23. DialogThread::DialogThread()
  24. {    
  25. }
  26.  
  27. DialogThread::~DialogThread()
  28. {
  29. }
  30.  
  31. BOOL DialogThread::InitInstance()
  32. {    HANDLE hReset,hShutdown,hEvent;
  33.  
  34.     ButtonDlg BDlg;
  35.     g_pBtnDlg = &BDlg;
  36.  
  37.     GetBasicEvents(&hReset,&hShutdown);
  38.     
  39.     //DuplicateHandle(GetCurrentProcess(),hThread,GetCurrentProcess(),&hThread2,NULL,FALSE,DUPLICATE_SAME_ACCESS);
  40.  
  41.     Registerthread(&hEvent);
  42.  
  43.  
  44.     BDlg.DoModal();
  45.  
  46.     SetEvent(hEvent);
  47.     return TRUE;
  48. }
  49.  
  50. int DialogThread::ExitInstance()
  51. {
  52.     // TODO:  perform any per-thread cleanup here
  53.     return CWinThread::ExitInstance();
  54. }
  55.  
  56. BEGIN_MESSAGE_MAP(DialogThread, CWinThread)
  57.     //{{AFX_MSG_MAP(DialogThread)
  58.         // NOTE - the ClassWizard will add and remove mapping macros here.
  59.     //}}AFX_MSG_MAP
  60. END_MESSAGE_MAP()
  61.  
  62. /////////////////////////////////////////////////////////////////////////////
  63. // DialogThread message handlers
  64.  
  65.  
  66.