home *** CD-ROM | disk | FTP | other *** search
/ HTBasic 9.3 / HTBasic 9.3.iso / 83win / data1.cab / DLL_Toolkit / Source / HTBClock / HTBclock.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-03-02  |  1.2 KB  |  55 lines

  1. /**********************************************
  2. HTBclock.dll
  3. TransEra Corporation 1999.
  4. This is the source for the HTBClock.dll.
  5.  
  6. ***********************************************/
  7.  
  8. #include "stdafx.h"
  9. #include "HTBclock.h"
  10. #include "lockDlg.h"
  11. #include "DialogThread.h"
  12.  
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18.  
  19. short g_Xpos;
  20. short g_Ypos;
  21. ClockDlg * g_ClockVar;
  22.  
  23. BEGIN_MESSAGE_MAP(CHTBclockApp, CWinApp)
  24.     //{{AFX_MSG_MAP(CHTBclockApp)
  25.         // NOTE - the ClassWizard will add and remove mapping macros here.
  26.         //    DO NOT EDIT what you see in these blocks of generated code!
  27.     //}}AFX_MSG_MAP
  28. END_MESSAGE_MAP()
  29.  
  30. CHTBclockApp::CHTBclockApp() 
  31. {
  32.     
  33. }
  34.  
  35. CHTBclockApp theApp;
  36.  
  37.  
  38. void Clock(short xpos, short ypos) 
  39. {
  40.     g_Xpos = xpos;
  41.     g_Xpos = ypos;
  42.     if (g_ClockVar == NULL) {        
  43.         CWinThread * pThread = AfxBeginThread(RUNTIME_CLASS (DialogThread));    // create thread to execute dialog
  44.     }
  45. }
  46.  
  47. void Closeclock() 
  48. {
  49.     if (g_ClockVar != NULL) 
  50.     {    
  51.         g_ClockVar->KillTimer(1);            // stop timer from updating dialog
  52.         g_ClockVar->EndDialog(1);            // tell dialog to end
  53.         g_ClockVar = NULL;                    // set pointer to NULL to show no dialog running (dialog is still shutting down)        
  54.     }
  55. }